Add files via upload #51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |