ci(ci): add OpenRouter API key secret to deploy workflow

This commit is contained in:
Prad Nukala committed 2026-09-30 15:31:31 -04:00
1 parent 856ab0667a
commit d7fbe88eb8
1 file changed
+10 -2
+10 -2
View File
@@ -54,8 +54,9 @@ jobs:
# Deploys on every main push (not path-filtered): apps/api/data/schedule.json # Deploys on every main push (not path-filtered): apps/api/data/schedule.json
# is bundled at deploy time, and re-deploying an unchanged Worker is a no-op. # is bundled at deploy time, and re-deploying an unchanged Worker is a no-op.
# Needs repo secrets CLOUDFLARE_API_TOKEN (Workers Scripts: Edit) and # Needs repo secrets CLOUDFLARE_API_TOKEN (Workers Scripts: Edit),
# CLOUDFLARE_ACCOUNT_ID. # CLOUDFLARE_ACCOUNT_ID, and OPENROUTER_API_KEY (the docs assistant's
# POST /ask; the Actions secret is the one copy, mirrored into the Worker).
deploy-api: deploy-api:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -68,6 +69,13 @@ jobs:
# DST cron guards must hold before the Worker ships. # DST cron guards must hold before the Worker ships.
- run: bun run api:test - run: bun run api:test
- run: printf %s "$OPENROUTER_API_KEY" | bunx wrangler secret put OPENROUTER_API_KEY
working-directory: apps/api
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
- run: bun run api:deploy - run: bun run api:deploy
env: env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}