Skip to content

Update GH Actions configuration to reflect the new domain URL #33

Update GH Actions configuration to reflect the new domain URL

Update GH Actions configuration to reflect the new domain URL #33

---
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://blog.yefymenko.pp.ua
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://blog.yefymenko.pp.ua/sitemap.xml
- name: Ping Google about the updated RSS feed
run: >-
curl https://google.com/ping?sitemap=https://blog.yefymenko.pp.ua/feed.xml