Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/cloudflare-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ The script diffs status, caching and security headers for a fixed set of paths.

| Environment | Worker | Route | CSP |
| --- | --- | --- | --- |
| `test-staging` | `test-staging-new-expensify-assets` | `test-staging.new.expensify.com/*` | Staging |
| `test-staging` | `test-staging-new-expensify-assets` | `test-staging.new.expensify.com/*` (managed in Cloudflare, not in `wrangler.jsonc`) | Staging |
| `staging` | `staging-new-expensify-assets` | None until switchover, then `staging.new.expensify.com/*` | Staging |
| `production` | `new-expensify-assets` | None until switchover, then `new.expensify.com/*` | Production |

`test-staging` serves a staging build on a hostname nobody else uses. Every staging deploy also deploys the same build there (the `webDeployTestStaging` job in `.github/workflows/deploy.yml`), using `CLOUDFLARE_WORKERS_DEPLOY_TOKEN`, which can only edit this Worker. A failure there does not fail the staging deploy. To deploy it by hand, put a staging build in `dist/` and run:
`test-staging` serves a staging build on a hostname nobody else uses. Every staging deploy also deploys the same build there (the `webDeployTestStaging` job in `.github/workflows/deploy.yml`), using `CLOUDFLARE_WORKERS_DEPLOY_TOKEN`, which can only edit this Worker. That token can't read zones, so the route isn't in `wrangler.jsonc`: wrangler would try to sync it and fail. A failure there does not fail the staging deploy. To deploy it by hand, put a staging build in `dist/` and run:

```bash
npx wrangler deploy --env test-staging
Expand Down
3 changes: 2 additions & 1 deletion web/cloudflare-worker/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
},
"env": {
// Serves a staging build on a hostname nobody else uses, so it can be deployed and tested independently.
// Its route (test-staging.new.expensify.com/*) is managed in Cloudflare, not here: syncing routes needs zone
// access, and the CI deploy token can only edit this Worker.
"test-staging": {
"name": "test-staging-new-expensify-assets",
"routes": [{"pattern": "test-staging.new.expensify.com/*", "zone_name": "expensify.com"}],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a good idea to not keep this here too as a bad edit to the route here can bring the site down

"vars": {
"ENVIRONMENT": "staging",
},
Expand Down
Loading