Skip to content

Commit a87395a

Browse files
jchrisclaude
andcommitted
fix(cloud): enable tag-to-deploy for production cloud worker
The deploy workflow existed but couldn't deploy to production — wrangler:deploy was hardcoded to --env dev and wrangler.toml had no [env.production] section. This adds the production env config with a fresh D1 database and parameterizes the deploy scripts to use CLOUDFLARE_ENV. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d7341f5 commit a87395a

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.github/workflows/ci-core-cf-deploy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
ACCESS_KEY_ID: ${{ vars.ACCESS_KEY_ID }}
4343
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
4444
CLOUDFLARE_DATABASE_ID: ${{ vars.CLOUDFLARE_DATABASE_ID }}
45+
CLOUDFLARE_ENV: ${{ vars.CLOUDFLARE_ENV }}
4546
FP_ENDPOINT: ${{ vars.FP_ENDPOINT }}
4647
STORAGE_URL: ${{ vars.STORAGE_URL }}
4748
run: |

cloud/backend/cf-d1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"publish": "echo skip",
1111
"drizzle:d1-local": "drizzle-kit push --config ./drizzle.cloud.d1-local.config.ts",
1212
"drizzle:d1-remote": "drizzle-kit push --config ./drizzle.cloud.d1-remote.config.ts",
13-
"wrangler:deploy": "wrangler deploy -c ./wrangler.toml --env dev"
13+
"wrangler:deploy": "wrangler deploy -c ./wrangler.toml --env ${CLOUDFLARE_ENV:-dev}"
1414
},
1515
"keywords": [
1616
"ledger",

cloud/backend/cf-d1/wrangler.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,20 @@ binding = "FP_BACKEND_D1"
7979
database_name = "fp-cloud-dev"
8080
database_id = "b0c1ea22-b733-420c-b812-bea9ffaa1676"
8181

82+
[env.production.vars]
83+
VERSION = "FP-MSG-1.0"
84+
85+
[[env.production.migrations]]
86+
tag = "v1"
87+
new_classes = ["FPRoomDurableObject"]
88+
89+
[env.production.durable_objects]
90+
bindings = [
91+
{ name = "FP_WS_ROOM", class_name = "FPRoomDurableObject" }
92+
]
93+
94+
[[env.production.d1_databases]]
95+
binding = "FP_BACKEND_D1"
96+
database_name = "fp-cloud-production"
97+
database_id = "ee23476b-c3c8-44c9-8388-d9455dd1b00f"
98+

0 commit comments

Comments
 (0)