Skip to content

Commit

Permalink
Merge pull request #2 from OlenaYefymenko/gh-actions-setup
Browse files Browse the repository at this point in the history
Gh actions setup
  • Loading branch information
OlenaYefymenko committed Aug 26, 2023
2 parents 303f064 + f66eb21 commit 5e142af
Show file tree
Hide file tree
Showing 20 changed files with 148 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/build-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---

name: Build website and publish to GH pages

on:
push:
branches:
- main
pull_request:

jobs:
build:
name: 👷
runs-on: ubuntu-latest

steps:
- name: Switch to Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Check out src from Git
uses: actions/checkout@v3
- name: Install Lektor from PyPI
run: >-
python -m
pip install
--user
-r requirements.in
-c requirements.txt
- name: Generate the static website
run: >-
~/.local/bin/lektor
build
--verbose
--output-path www
- name: Save the generated HTML output as a GitHub Actions artifact
uses: actions/upload-pages-artifact@v2
with:
path: www

publish:
name: 📢
needs:
- build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest

environment:
name: gh-pages
url: https://olenayefymenko.github.io/blog

permissions:
pages: write
id-token: write

steps:
- name: Publish the Lektor website to GH Pages
uses: actions/deploy-pages@v2

notify-google:
name: 📝
needs:
- publish
runs-on: ubuntu-latest

steps:
- name: Wait 2 minutes for GitHub Pages to invalidate the cache
run: sleep 120
- name: Ping Google about the updated sitemap
run: >-
curl https://google.com/ping?sitemap=https://olenayefymenko.github.io/blog/sitemap.xml
- name: Ping Google about the updated RSS feed
run: >-
curl https://google.com/ping?sitemap=https://olenayefymenko.github.io/blog/feed.xml
10 changes: 10 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

extends: default

rules:
indentation:
level: error
indent-sequences: false

...
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Lektor
63 changes: 63 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile requirements.in
#
babel==2.12.1
# via lektor
blinker==1.6.2
# via flask
certifi==2023.7.22
# via requests
charset-normalizer==3.2.0
# via requests
click==8.1.7
# via
# flask
# lektor
exifread==3.0.0
# via lektor
filetype==1.2.0
# via lektor
flask==2.3.3
# via lektor
idna==3.4
# via requests
inifile==0.4.1
# via lektor
itsdangerous==2.1.2
# via flask
jinja2==3.1.2
# via
# flask
# lektor
lektor==3.3.10
# via -r requirements.in
markupsafe==2.1.3
# via
# jinja2
# lektor
# werkzeug
mistune==0.8.4
# via lektor
python-slugify==8.0.1
# via lektor
pytz==2023.3
# via lektor
requests==2.31.0
# via lektor
text-unidecode==1.3
# via python-slugify
urllib3==2.0.4
# via requests
watchdog==3.0.0
# via lektor
werkzeug==2.3.7
# via
# flask
# lektor

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5e142af

Please sign in to comment.