Skip to content

how it works content update #6

how it works content update

how it works content update #6

name: Auto-Fix Page Permalinks (Bidirectional)
on:
push:
paths:
- "src/content/pages/**/*.yaml"
pull_request:
paths:
- "src/content/pages/**/*.yaml"
jobs:
auto-fix:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository with full history
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Run bidirectional permalink sync
run: |
python .github/scripts/auto_fix_permalinks.py
- name: Commit and push changes (if any)
run: |
if [[ -n "$(git status --porcelain)" ]]; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add src/content/pages
git commit -m "Auto-sync permalink and filename"
git push
else
echo "No permalink or filename changes to commit."
fi