Repository navigation
ci(router): build the router from git on main only - #336
Merged
Merged
Conversation
Vercel's Git integration built a preview of apps/router for every branch that changed it, with coder-docs's preview environment variables and no reviewer in front of it. Once the repository is public, a fork's branch would be held only by Vercel's fork protection. router-pr-preview.yml now previews router changes from Actions behind the docs-preview reviewers, so git.deploymentEnabled turns the Git builds off for every branch except main, which still deploys production. A branch matching both patterns deploys if either is true, so main keeps deploying; "**" also matches branch names with a slash. A router test pins the setting, and the docs say a pull request gets no Vercel bot preview any more. Assisted-by: AI
nickvigilante
requested a deployment
to
docs-preview
November 12, 2026 18:49 — with
GitHub Actions
Waiting
nickvigilante
marked this pull request as ready for review
November 12, 2026 19:45
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge order
After #333 (merged), which previews router changes from Actions. Independent of the open PRs.
Summary
Turns off Vercel's Git-triggered builds of
apps/routeroncoder-docsfor every branch exceptmain.mainstill deploys production from Git as today; pull requests get their router preview only fromrouter-pr-preview.yml, behind thedocs-previewreviewers.Fix
Vercel's Git integration built a preview of
apps/routerfor every branch that changed it, running the branch's code withcoder-docs's preview environment variables and no reviewer in front of it. Once the repository is public, a fork's pull request would be held back only by Vercel's fork protection, which a single "authorize" click releases. Security asked for those builds to be off before the flip.apps/router/vercel.jsongains"git": { "deploymentEnabled": { "**": false, "main": true } }. Vercel deploys a branch when any matching rule istrue, somainmatches both rules and keeps deploying, and every other branch matches only"**"and doesn't."**"rather than"*"so branch names with a slash, such asvigilante/topic, are covered. I chose this over disconnecting the project from Git, which would also stop production deploys frommain.A test in
apps/router/lib/vercel-config.test.tspins the setting.AGENTS.md, the README's project table and the header ofrouter-pr-preview.ymlnow say a pull request gets no Vercel bot preview, and thatrouter-pr-preview.ymlis a router change's only preview.QA
Nothing to see on the docs site.
vercel.jsonfrom the commit it builds, so the setting already applies to this PR's own push. Therouter-pr-previewrun does start, because this PR changes files underapps/router/, and its deploy job waits for adocs-previewreviewer.mainpush still shows a production deployment on the coder-docs deployments page, and coder.com/docs keeps serving.apps/router, the Vercel bot doesn't post a preview, and therouter-pr-previewrun's deploy job waits for adocs-previewreviewer as before.Testing
The new test fails against the current
vercel.jsonand passes with the change. All 184 router tests pass and the router typecheck passes. actionlint reports the workflow clean, and Oxfmt formatted the changed files. The"**"/"main"precedence comes from Vercel's Git configuration docs ("When a branch matches multiple rules and at least one is true, a deployment occurs").Upstream
No: Vercel project configuration, not Fumadocs.
Linear: DOCS-1486
🤖 Built with AI assistance.