Skip to content

Commit 037aee8

Browse files
committed
fix: update wrangler.toml generation to replace placeholder with environment variable for database_id
1 parent c999812 commit 037aee8

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ jobs:
3737
- name: Install dependencies
3838
run: pnpm install --frozen-lockfile
3939

40-
- name: Copy wrangler.toml from example
41-
run: cp wrangler.toml.example wrangler.toml
40+
- name: Generate wrangler.toml from example
41+
run: |
42+
cp wrangler.toml.example wrangler.toml
43+
sed -i "s/PLACEHOLDER_DATABASE_ID/${CLOUDFLARE_DATABASE_ID}/g" wrangler.toml
4244
4345
- name: Generate API wrangler.toml from example
4446
working-directory: apps/api

wrangler.toml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ enabled = true
1313
[[d1_databases]]
1414
binding = "DB"
1515
database_name = "tabitabi"
16-
# database_id is set via the environment variable CLOUDFLARE_DATABASE_ID
16+
database_id = "PLACEHOLDER_DATABASE_ID"

0 commit comments

Comments
 (0)