Branch-to-Environment Map
| Branch or event | What deploys | Follow-up automation |
|---|---|---|
Feature branch / non-production push | Vercel preview deployment for the touched app workflow | None by default |
staging push | Vercel preview deployment | supabase-staging.yaml can apply staging migrations after preview succeeds |
production push | Vercel production deployment | supabase-production.yaml can apply production migrations after prerequisites pass |
main push for apps/discord | Discord Modal deployment after Python CI succeeds | None |
Manual workflow_dispatch | Depends on workflow | Bypasses normal branch trigger timing, but not the workflow logic |
Self-hosted server after git pull | Docker deploy from current checkout | Optional blue/green cutover through bun serve:web:docker:bg |
Hosted Web Release Flow
Preview
- Preview workflows are named
vercel-preview-<app>.yaml. - They trigger on non-
productionpushes. - Each workflow checks whether a newer commit exists on the same branch before spending time on install/build/deploy.
- Preview deploys are the normal validation surface for branch work.
Staging Database
supabase-staging.yamlis tied to theVercel Platform Preview Deploymentworkflow on thestagingbranch.- The staging migration runs only when the triggering preview deployment concludes successfully, or when manually dispatched.
- This means
stagingis the branch where app preview and staging schema advancement are meant to stay aligned.
Production
- Production web deploys run through
vercel-production-<app>.yaml. apps/webproduction deploys are handled byvercel-production-platform.yaml.- The production workflow also skips if a newer commit already exists on
production.
Production Database
supabase-production.yaml is stricter than staging:
- The latest production Vercel deployment must have concluded successfully.
- The latest staging migration must have concluded
successorskipped. - A manual dispatch can still be used when an operator explicitly wants to run it.
Self-Hosted Web Release Flow
If a server receives code throughgit pull, use the Docker production commands from
the checked-out commit:
bun serve:web:dockerfor in-place replacementbun serve:web:docker:bgfor blue/green rebuild-before-cutover deployment
Team Release Checklist
- Merge the change set with green CI.
- If Docker behavior changed, make sure
docker-setup-check.yamlis green. - If database migrations changed, confirm the staging path first.
- Promote to
productiononly after preview or staging behavior is understood. - Confirm the follow-up Supabase workflow after production deployment.
- For self-hosted rollout, deploy from the intended commit and prefer
bun serve:web:docker:bg.
Rollback Guidance
- Vercel-hosted rollback: redeploy the previous known-good commit or use Vercel rollback tooling.
- Supabase rollback: use a corrective migration instead of editing applied migration history.
- Self-hosted Docker rollback: checkout the previous known-good commit and rerun
bun serve:web:docker:bg.
What Not To Do
- Do not push production schema changes directly from a laptop as the normal path.
- Do not assume
stagingandproductionmigrations are interchangeable; they are gated differently. - Do not use the in-place Docker path when you specifically need rebuild-before-restart semantics.