Skip to content

fix: change giscus mapping from pathname to title to survive URL changes #14

fix: change giscus mapping from pathname to title to survive URL changes

fix: change giscus mapping from pathname to title to survive URL changes #14

Workflow file for this run

name: Update README and All Articles
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- 'docs/all-articles.md'
- 'mkdocs.yml'
workflow_dispatch:
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: pip install pyyaml
- name: Check markdown docs
run: python scripts/check_docs.py || true
- name: Generate README, all-articles and mkdocs nav
run: python scripts/generate_readme.py --target all
- name: Check if files changed
id: check_changes
run: |
if git diff --quiet README.md docs/all-articles.md mkdocs.yml; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push if changed
if: steps.check_changes.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md docs/all-articles.md mkdocs.yml
git commit -m "docs: auto-update README, all-articles and mkdocs nav"
git push