Skip to content

Commit 471b22a

Browse files
authored
Merge PR #164: promote staging → main — set GITHUB_TOKEN on prod Convex
Merge: promote staging → main — set GITHUB_TOKEN on prod Convex
2 parents c5ea3d8 + 4b0692c commit 471b22a

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/frontend-cd.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ jobs:
3131
env:
3232
CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }}
3333

34+
- name: Set Convex GITHUB_TOKEN for skill imports
35+
# skills.ts (repo skill import / SKILL.md fetch) calls the GitHub API
36+
# from Convex egress — without a token it shares the 60/req/hr anon
37+
# limit and fails. Set it on the SAME deployment CONVEX_DEPLOY_KEY
38+
# targets (prod on main, staging otherwise), idempotently, so it rotates
39+
# with the SKILLS_GITHUB_TOKEN secret. Fail-soft when the secret is unset.
40+
run: |
41+
cd packages/convex-backend
42+
if [ -n "$SKILLS_GITHUB_TOKEN" ]; then
43+
npx convex env set GITHUB_TOKEN "$SKILLS_GITHUB_TOKEN"
44+
else
45+
echo "SKILLS_GITHUB_TOKEN not set for this environment — skipping"
46+
fi
47+
env:
48+
CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }}
49+
SKILLS_GITHUB_TOKEN: ${{ secrets.SKILLS_GITHUB_TOKEN }}
50+
3451
- name: Determine environment
3552
id: env
3653
run: |

0 commit comments

Comments
 (0)