Skip to content

Commit 1fe13f7

Browse files
committed
fix: skip pre-push hook on bot teaser commit in CD workflow
The git push triggers the pre-push hook which runs verify, but MAPBOX_PUBLIC_TOKEN isn't set for that step. The code has already been verified by this point, so --no-verify is safe.
1 parent ac5572e commit 1fe13f7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/cd.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ jobs:
5454
- run: npm run generate-teasers
5555
env:
5656
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
57+
- name: Commit auto-generated teasers
58+
run: |
59+
git config user.name "github-actions[bot]"
60+
git config user.email "github-actions[bot]@users.noreply.github.com"
61+
git add "www/**/*.md" .revisions.json
62+
git diff --cached --quiet || \
63+
git commit -m "chore: auto-generate teasers [skip ci]" && git push --no-verify
5764
- run: npm run build
5865
env:
5966
MAPBOX_PUBLIC_TOKEN: ${{ secrets.MAPBOX_PUBLIC_TOKEN }}
@@ -62,13 +69,6 @@ jobs:
6269
name: dist-www
6370
path: dist/www
6471
retention-days: 15
65-
- name: Commit auto-generated teasers
66-
run: |
67-
git config user.name "github-actions[bot]"
68-
git config user.email "github-actions[bot]@users.noreply.github.com"
69-
git add "www/**/*.md" .revisions.json
70-
git diff --cached --quiet || \
71-
git commit -m "chore: auto-generate teasers [skip ci]" && git push
7272

7373
deploy:
7474
needs:

0 commit comments

Comments
 (0)