Skip to content

Commit 80ed03c

Browse files
authored
Merge pull request #15 from ZeroStash/ci/fix-deployment-environment-variables
ci: use --define to pass the D1 database ID
2 parents 904c5f7 + ca90fb2 commit 80ed03c

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ on:
88
- 'dashboard/**'
99
- 'migrations/**'
1010
- 'wrangler.jsonc'
11-
- '.github/workflows/deploy-dashboard.yml'
11+
- '.github/workflows/deploy.yml'
1212
pull_request:
1313
paths:
1414
- 'src/**'
1515
- 'dashboard/**'
1616
- 'migrations/**'
1717
- 'wrangler.jsonc'
18-
- '.github/workflows/deploy-dashboard.yml'
18+
- '.github/workflows/deploy.yml'
1919

2020
permissions:
2121
contents: read
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Deploy Worker + assets
4949
if: github.ref == 'refs/heads/main'
50-
run: npx wrangler deploy
50+
run: npx wrangler deploy --define CLOUDFLARE_D1_DATABASE_ID:"${CLOUDFLARE_D1_DATABASE_ID}"
5151
env:
5252
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
5353
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

wrangler.jsonc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "node_modules/wrangler/config-schema.json",
33
"name": "coverage-tracker",
44
"main": "src/index.ts",
5+
"send_metrics": false,
56
"compatibility_date": "2026-06-25",
67
"compatibility_flags": ["nodejs_compat"],
78
"assets": {
@@ -26,7 +27,17 @@
2627
"database_id": "$CLOUDFLARE_D1_DATABASE_ID",
2728
"migrations_dir": "migrations"
2829
}
29-
]
30+
],
31+
"secrets": {
32+
"required": [
33+
"GITHUB_APP_ID",
34+
"GITHUB_APP_CLIENT_ID",
35+
"GITHUB_APP_PRIVATE_KEY",
36+
"GITHUB_WEBHOOK_SECRET",
37+
"CF_ACCESS_AUD",
38+
"CF_ACCESS_TEAM_DOMAIN"
39+
]
40+
}
3041
// Secrets (set with `wrangler secret put <NAME>`):
3142
// GITHUB_APP_ID
3243
// GITHUB_APP_CLIENT_ID

0 commit comments

Comments
 (0)