Sync Sitemap to Upptime #1425
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: Sync Sitemap to Upptime | |
| on: | |
| schedule: | |
| # run every hour | |
| - cron: "0 * * * *" | |
| workflow_dispatch: # Allow manual trigger | |
| env: | |
| SITEMAP_URL: https://regimed.at/sitemap.xml | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GH_PAT }} | |
| - name: Sync sitemap to .upptimerc.yml | |
| run: bash scripts/sync-sitemap.sh | |
| - name: Debug connectivity on failure | |
| if: failure() | |
| run: | | |
| echo "=== Runner public IP ===" | |
| curl -s https://ifconfig.me || true | |
| echo "" | |
| echo "=== DNS resolution ===" | |
| dig +short regimed.at || true | |
| echo "=== TCP connect test (retry after 30s pause) ===" | |
| sleep 30 | |
| curl -svo /dev/null --connect-timeout 10 --max-time 15 https://regimed.at/ 2>&1 | head -30 || true | |
| echo "=== Traceroute (TCP port 443) ===" | |
| sudo traceroute -T -p 443 -m 15 regimed.at 2>&1 | tail -20 || true | |
| - name: Commit and push if changed | |
| run: | | |
| git diff --quiet .upptimerc.yml && echo "No changes" && exit 0 | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add .upptimerc.yml | |
| git commit -m "chore: sync sites from sitemap" | |
| git push |