Files
purplebored.pl/.forgejo/workflows/sitemap.yml
2025-10-14 14:26:15 +00:00

40 lines
1.1 KiB
YAML

on:
push:
paths:
- "pages/**"
- "sitemap.sh"
jobs:
stats:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_TOKEN }}
- name: Set up repository
run: |
git reset --hard
git pull
git reset --hard
- name: Generate sitemap
run: |
sh ./sitemap.sh
- name: Stage the changes
run: |
git add sitemap.xml
- name: Commit and Push Changes
run: |
if git diff --staged --quiet; then
echo "No changes to commit."
else
git config --local user.email "sitemap@localhost"
git config --local user.name "Sitemap CI/CD"
git commit -am "[skip ci] Update sitemap" || echo "No changes to commit"
git push origin HEAD -f
fi