Skip to content

Commit c4e905b

Browse files
committed
fix(ci): push automated data commits with BOT_TOKEN
The daily-update / weekly-digest jobs pushed with the default GITHUB_TOKEN (github-actions[bot]), which the 'main' ruleset rejected ('repository rule violations') since the bot is not a bypass actor — so no track data had been committed since initial setup. Persist the BOT_TOKEN PAT (whose admin owner is in the ruleset's Repository-admin bypass list) via actions/checkout instead. This also lets the data commits trigger deploy-pages: pushes made with GITHUB_TOKEN are suppressed by GitHub's workflow-recursion guard, so the site previously never refreshed after a data commit.
1 parent 478d484 commit c4e905b

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/daily-update.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ jobs:
2424
# Pin to main so a workflow_dispatch from a feature branch can't
2525
# publish data based on non-main code (the commit still lands on main).
2626
ref: main
27+
# Persist a PAT (admin owner) instead of GITHUB_TOKEN so the later
28+
# push (a) bypasses the `main` ruleset via the Repository-admin bypass
29+
# actor, and (b) triggers deploy-pages — GITHUB_TOKEN pushes are
30+
# suppressed by GitHub's workflow-recursion guard, so the site would
31+
# otherwise never refresh after a data commit.
32+
token: ${{ secrets.BOT_TOKEN }}
2733
- uses: actions/setup-python@v6
2834
with:
2935
python-version: '3.12'

.github/workflows/weekly-digest.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ jobs:
2424
# Pin to main so a workflow_dispatch from a feature branch can't
2525
# publish a digest built from non-main code.
2626
ref: main
27+
# Persist a PAT (admin owner) instead of GITHUB_TOKEN so the later
28+
# push (a) bypasses the `main` ruleset via the Repository-admin bypass
29+
# actor, and (b) triggers deploy-pages — GITHUB_TOKEN pushes are
30+
# suppressed by GitHub's workflow-recursion guard, so the site would
31+
# otherwise never refresh after a digest commit.
32+
token: ${{ secrets.BOT_TOKEN }}
2733
- uses: actions/setup-python@v6
2834
with:
2935
python-version: '3.12'

0 commit comments

Comments
 (0)