Deployment
apps/web deploys through GitHub Actions prebuilt deploys; docs sites deploy through Vercel's Git Integration.
The repo's active deploy paths are split by ownership:
apps/webis owned by GitHub Actions prebuilt deploys.apps/dev-docsandapps/webview-bridge-docsare owned by Vercel's Git Integration.
| Vercel project | Source path | Workflow | Repo variable | Owner |
|---|---|---|---|---|
today-web | apps/web | deploy-web.yml, deploy-web-lane-staging.yml, promote-web-production.yml | VERCEL_PROJECT_ID_WEB | Actions |
today-dev-docs (Vercel project: web-dev-docs) | apps/dev-docs | (none) | (n/a) | Vercel Git |
webview-bridge-docs | apps/webview-bridge-docs | (none) | (n/a) | Vercel Git |
The admin console (today-admin Vercel project, admin.today.ai) is deployed
from todayai-labs/today-admin.
For the underlying conceptual model, see Architecture -> Vercel deploy model.
Web Environments
| Flow | Git ref / action | GitHub environment | Vercel target | Public URL |
|---|---|---|---|---|
| Dev / PR preview | dev push or PR | web-preview | preview | deployment preview URL |
| Lane staging candidate | release/web-* push | web-lane-staging | production-mode candidate with --skip-domain | https://staging.today.ai |
| Production candidate review | manual promote workflow | web-production | production-mode candidate with --skip-domain | candidate preview URL |
| Production promote | approved workflow step | n/a | vercel promote of the production candidate | https://today.ai |
Use the terms precisely:
- lane staging is
staging.today.ai, tied to backend lane routing. Its web build injectsNEXT_PUBLIC_TRAFFIC_LANE=staging, so browser clients and BFF upstream fetches sendX-Traffic-Lane: staging. - production candidate is a separate production build from the same release
SHA without
NEXT_PUBLIC_TRAFFIC_LANE. It is the only artifact that may be promoted totoday.ai.
Because NEXT_PUBLIC_TRAFFIC_LANE is baked into browser JavaScript, promoting a
lane staging build to production would leak the staging lane into production
traffic. The production candidate therefore rebuilds from the release SHA.
Web Release Pipeline
See Web release flow for the operator checklist. The workflow files map to these stages:
cut-web-release.ymlcreates a temporaryrelease/web-*branch fromdevor another explicit source ref.deploy-web-lane-staging.ymlwaits for CI, builds a production-mode artifact withNEXT_PUBLIC_TRAFFIC_LANE=staging, deploys with--prod --skip-domain, and aliases it tostaging.today.ai.promote-web-production.ymlwaits for CI, builds the production candidate without lane env, pauses on theweb-productionapproval gate, verifies the release branch SHA did not move, promotes totoday.ai, tags the release, and opens abackmerge/web-*PR todevwhen needed.
promote-web-production.yml has skip_staging. Use it only when you want to
skip the lane staging check and inspect the production candidate preview
directly.
Required Vercel Setup
For today-web:
- Actions own CLI deploys. Keep Vercel Git auto-deploy disabled for the project.
today.aiis the production domain.staging.today.aiis an Actions-owned alias for lane staging deployments.- The custom Vercel
stagingenvironment should not trackmain; lane staging is built by GitHub Actions fromrelease/web-*using the production environment plus workflow-injected lane variables. - Do not set
X-Traffic-EnvorLANE_STAGING_TRAFFIC_ENV; the web lane contract isNEXT_PUBLIC_TRAFFIC_LANE=stagingat build time andX-Traffic-Lane: stagingon requests.
GitHub needs these shared variables/secrets:
vars.VERCEL_ORG_IDvars.VERCEL_PROJECT_ID_WEBsecrets.VERCEL_TOKENvars.TODAY_PLATFORM_CI_APP_IDsecrets.TODAY_PLATFORM_CI_APP_PRIVATE_KEYsecrets.POSTHOG_PROJECT_TOKEN_DEVsecrets.POSTHOG_PROJECT_TOKEN_PROD- optional source-map upload secrets:
POSTHOG_API_KEY,POSTHOG_PROJECT_ID_DEV,POSTHOG_PROJECT_ID_PROD,SENTRY_AUTH_TOKEN
PR Previews
deploy-web.yml handles only dev and PR preview deployments. It uses Vercel
preview env vars, waits for the required CI checks on the same SHA, deploys a
prebuilt preview artifact, and comments the preview URL on PRs.
Docs Sites
apps/dev-docs and apps/webview-bridge-docs deploy through Vercel's Git
Integration. Do not add GitHub Actions deploy workflows for them unless the app
is explicitly migrated to Actions-owned prebuilt deploys and its vercel.json
disables Vercel Git deploys at the same time.
Rollback
Vercel keeps every deploy. Runtime rollback is a human-selected Vercel rollback or promotion of a previous deployment.
For code-level rollback, create a revert PR against dev, let it land through
the merge queue, cut a new release/web-* branch, and run the normal promote
flow. The durable production archive is the web-prod-* tag, not main.