You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge deploy automation after Scout merge-ready. Robin approved override despite missing Cloudflare repo secrets; post-merge workflow may fail until secrets are configured.
Copy file name to clipboardExpand all lines: docs/infra/README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,28 @@ Expected results:
86
86
-`/api/health`: all Phase 1 bindings present, AI Gateway configured mode
87
87
-`/api/db-smoke`: `ok=true`, database `neondb`, user `neondb_owner`, schema `public`
88
88
89
+
## Automated preview deployment
90
+
91
+
GitHub Actions deploys the Cloudflare preview Worker after the CI `check` job succeeds on `push` to `main`. The deploy job runs:
92
+
93
+
```bash
94
+
npm ci
95
+
npm run cf:build
96
+
npx wrangler deploy --env preview
97
+
```
98
+
99
+
A manual `workflow_dispatch` run is also available, but the deploy job is guarded to run only from `refs/heads/main`. Pull requests and non-`main` branches never deploy.
100
+
101
+
Required GitHub Actions secrets/config for preview deploy:
102
+
103
+
-`CLOUDFLARE_API_TOKEN`: Cloudflare API token with permission to deploy the `commandgrid-preview` Worker and read/write the configured preview resources as required by Wrangler.
104
+
-`CLOUDFLARE_ACCOUNT_ID`: Cloudflare account ID used by Wrangler during non-interactive deploys.
105
+
-`CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_COMMANDGRID_DB`: deploy-time Hyperdrive local connection string for the `COMMANDGRID_DB` binding. Use the safe preview/deploy equivalent of `COMMANDGRID_DATABASE_URL`; never commit or print the value.
106
+
107
+
If any required secret is missing, the deploy job fails during the `Verify deploy configuration` step with the missing secret name only. Secret values are never printed.
108
+
109
+
This automation targets only the `preview` Wrangler environment (`commandgrid-preview`). It does not deploy production.
110
+
89
111
## Deployment caveats
90
112
91
113
OpenNext/Cloudflare requires a local Hyperdrive emulation connection string during build/deploy. Use the local secret only:
0 commit comments