Commit 146d444
authored
fix(dotcom): always deploy Zero for dotcom previews (tldraw#8967)
Closes tldraw#8965
## What
Dotcom previews now always deploy a single-node Zero backend, so the
`@tldraw.com` "proper Zero" opt-in is valid on every preview.
Previously a plain `dotcom-preview-please` deploy set
`DEPLOY_ZERO=false` unless the `preview-flyio-zero-deploy-please` label
was present, but the client still opted any `@tldraw.com` user into
proper Zero — pointing staff at the placeholder backend
`zero-backend-not-deployed.tldraw.com`, which doesn't exist for the
preview.
This takes option 2 from the issue (deploy Zero for previews) rather
than gating the opt-in client-side.
## Changes
- **`.github/workflows/deploy-dotcom.yml`** — "Determine zero deploy
target": any PR preview now sets `DEPLOY_ZERO=flyio` (single-node).
Removed the `preview-flyio-zero-deploy-please` label check, the
commented-out auto-label block, and the diff-based `apps/dotcom/`
fallback that resolved to `false`. `production`/`main` stay on
`flyio-multinode`.
- **`internal/scripts/deploy-dotcom.ts`** — `getZeroUrl()` preview case
now always returns the deployed fly URL; removed the dead
`zero-backend-not-deployed` preview branch.
## Pruning / cleanup
No prune changes needed: each preview creates `pr-<n>-zero-cache`, which
already matches `prune-preview-deploys.ts`'s `ZERO_CACHE_APP_REGEX` and
is destroyed daily once the PR has been closed for >2 days.
## Follow-ups
- Delete the now-unused `preview-flyio-zero-deploy-please` GitHub label
(not referenced anywhere in code).
- Every dotcom preview now provisions a fly `zero-cache` app + runs Zero
migrations against its Supabase branch DB — small added per-preview
cost/latency.
## Test plan
1. Open a PR and apply `dotcom-preview-please`.
2. Sign into the preview with a `@tldraw.com` account.
3. Confirm the console logs `[Zero] Using proper Zero (@tldraw.com
email)` against the preview's `pr-<n>-zero-cache.fly.dev` backend and
that Zero-backed features work.1 parent 162927a commit 146d444
2 files changed
Lines changed: 3 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 58 | | |
65 | | - | |
| 59 | + | |
66 | 60 | | |
67 | 61 | | |
68 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
| 461 | + | |
| 462 | + | |
468 | 463 | | |
469 | 464 | | |
470 | 465 | | |
| |||
0 commit comments