Update plugins #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |