Files
mandaloreandClaude Opus 5.5 a8cb306f88 Push ELO refresh with the PAT so it triggers the 40k deploy
actions/checkout persists GITEA_TOKEN as an http.extraheader, which
takes precedence over the token in the remote URL. Gitea doesn't fire
workflows for pushes made with GITEA_TOKEN, so the refreshed data never
deployed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-22 16:34:24 -05:00

35 lines
1.3 KiB
YAML

name: Weekly ELO Sync
# Original GitLab pipeline schedule ran Wednesdays 02:00 Atlantic/Azores.
# Actions cron is always UTC with no DST handling, so this is a fixed
# approximation (02:00 UTC) rather than an exact equivalent year-round.
on:
schedule:
- cron: '0 2 * * 3'
workflow_dispatch:
jobs:
refresh:
runs-on: host
steps:
- uses: actions/checkout@v4
with:
# Otherwise checkout's GITEA_TOKEN auth header overrides the PAT in the
# push URL, and Gitea won't trigger the deploy for a bot-token push.
persist-credentials: false
- name: Refresh ELO data
working-directory: sites/40k-rankings/statcheck-elo-scraper
run: python3 refresh_elo.py
- name: Commit and push if changed
env:
SYNC_ACCESS_TOKEN: ${{ secrets.SYNC_ACCESS_TOKEN }}
run: |
git config user.email "gitea-actions@gateway-gamers.net"
git config user.name "Gitea Actions"
git remote set-url origin "https://mandalore:${SYNC_ACCESS_TOKEN}@gl.mando.club/mandalore/gateway-gamers.net.git"
git add sites/40k-rankings/public/elo-data.json
if ! git diff --cached --quiet; then
git commit -m "data: refresh stat-check ELO rankings"
git push origin HEAD:main
fi