Repository navigation
Conversation
Replace Vercel's per-push git auto-deploys with opt-in, label-gated previews. Disable Vercel's git integration via git.deploymentEnabled:false in each project's vercel.json (kitchen-sink, docs, ui/storybook), and add a Preview Deploy workflow that builds and deploys a target from the PR branch when a preview/* label is applied, posting the deployment URL as a sticky PR comment. Redeploys on new commits while the label is present. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YNm7FjNHvCmkfEyZAbwNoB
Preview deploys failed cryptically ("--token missing a value") when the
Vercel secrets aren't configured, and posted no comment, so labeled targets
had no findable link. Add a preflight that detects missing secrets and skip
the deploy steps, and always post a sticky per-target comment: the URL on
success, an actionable pointer (missing secrets / build failed) with a link
to the run otherwise. Each label remains an independent run/check/comment.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNm7FjNHvCmkfEyZAbwNoB
|
❌ Preview —
|
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf3c154fce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,4 +1,7 @@ | |||
| { | |||
| "git": { | |||
| "deploymentEnabled": false | |||
There was a problem hiding this comment.
Preserve production deployments when disabling automatic previews
After this merges to the production branch, production updates stop as well as PR previews. Vercel documents that this boolean disables automatic deployments for “all branches”, and the same setting is added to all three projects. I checked .github/workflows/preview-deploy.yml, ci.yml, release.yml, and snapshot-release.yml: the replacement only handles PR events and deploys preview artifacts, with no production deployment path. Keep the production branch enabled through a branch-specific configuration, or add a production deployment replacement before disabling the git integration globally.
Useful? React with 👍 / 👎.
What & why
Vercel currently rebuilds on every commit to every PR branch, which is noisy given how often we commit. We rarely need a PR preview, but when we do we want it — without paying the per-commit build tax. This replaces automatic git deploys with opt-in, label-gated previews.
How it works
git.deploymentEnabled: falsein each project'svercel.json(apps/kitchen-sink,apps/docs,packages/ui). We deliberately avoid the flaky Ignored Build Step mechanism, which produces stuck "waiting for deployment" / phantom-canceled checks.Preview Deployworkflow (.github/workflows/preview-deploy.yml) triggers onlabeled/synchronizeand deploys only the labeled target(s), building locally in the runner and uploading prebuilt artifacts (vercel build+vercel deploy --prebuilt), so Vercel never runs its own build.preview/kitchen-sinkapps/kitchen-sink(Next.js)preview/docsapps/docs(Docusaurus)preview/storybookpackages/ui(Storybook)synchronize). Remove the label to stop. This is documented and easy to switch to[labeled]-only if we'd rather deploy strictly on the labeled commit.Setup required before this works (see
docs/contributing/preview-deployments.md)VERCEL_TOKEN,VERCEL_ORG_ID,VERCEL_PROJECT_ID_KITCHEN_SINK,VERCEL_PROJECT_ID_DOCS,VERCEL_PROJECT_ID_STORYBOOK.preview/*labels.Notes
vercel.json) → per-project ID secrets.🤖 Generated with Claude Code
https://claude.ai/code/session_01YNm7FjNHvCmkfEyZAbwNoB
Generated by Claude Code
Note
Medium Risk
Changes how all PR previews are produced and requires secrets/branch-protection follow-up; misconfiguration could block merges or leave teams without previews until labels are applied.
Overview
Stops automatic Vercel builds on every PR push and replaces them with opt-in previews triggered by
preview/*labels.Each Vercel project (
apps/kitchen-sink,apps/docs,packages/ui) now setsgit.deploymentEnabled: falseinvercel.json. A new Preview Deploy workflow runs on PRlabeled/synchronize, maps labels to targets (preview/kitchen-sink,preview/docs,preview/storybook), builds on the runner withvercel build+vercel deploy --prebuilt, and posts or updates a sticky PR comment per target. Concurrency cancels in-flight deploys when newer commits land.docs/contributing/preview-deployments.mddocuments usage, required GitHub secrets, label setup, and branch-protection notes. An internal changeset records the change.Reviewed by Cursor Bugbot for commit 8a1910c. Configure here.