Skip to content

Add files via upload #51

Add files via upload

Add files via upload #51

Workflow file for this run

name: "JOE-TRON :: SITE-MAP-DISPATCH"
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
sentinel-dispatch:
name: "JOE-TRON :: Sentinel Dispatch"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "JOE-TRON :: Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "JOE-TRON :: Execute Sitemap Script"
run: |
# Use ${GITHUB_WORKSPACE} to ensure we are in the repository root
cd ${GITHUB_WORKSPACE}
if [ -f "./sitemap.sh" ]; then
chmod +x ./sitemap.sh
./sitemap.sh
else
echo "::error::JOE-TRON FATAL: sitemap.sh NOT FOUND at $(pwd)"
ls -R # List files to debug if it fails again
exit 1
fi
- name: "JOE-TRON :: Commit & Push"
run: |
git config --global user.name "Joe-Tron-Automaton"
git config --global user.email "joe-tron@github.local"
git add -A
if ! git diff --staged --quiet; then
git commit -m "JOE-TRON: Automated sitemap update"
git push
else
echo "JOE-TRON: No changes to commit."
fi