Repository navigation
ci(vercel): deploy only main and opted-in branches instead of skipping builds - #1509
Conversation
Nearly every PR adds a changelog line, so counting it previewed the site on almost every push. Production still builds the changelog page.
…g builds Vercel counts a build cancelled by ignoreCommand as a deployment against the daily cap, so the ignore step saved minutes but not quota. Turn git deployments off for every branch except main and branches named -web- (site) or -demo- (demo), and drop the ignore script.
|
No actionable comments were generated in the recent review.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The team's Vercel Hobby plan caps deploys at 100 a day. On 2026-10-26 the team hit 124, and drydock's two projects were 43 of those, mostly previews on pushes that can't change the site or demo (backend fixes, Renovate, merges into dev). That held another project's production deploy back about 11 hours.
An ignore step doesn't fix this. Vercel counts a build that
ignoreCommandcancels as a full deployment against the quota (project settings docs, Ignored Build Step). The only lever is not creating the deployment, so bothvercel.jsonfiles now setgit.deploymentEnabled:**main, so production is unchanged-web-for the site (fix/v1.8-web-mobile-nav),-demo-for the demoVercel deploys a branch when any matching rule is true (git configuration docs), which is why
mainstill deploys under the**rule.The trade-off is that a site or demo change on a branch without the tag gets no preview. CI's site build still runs on it, and renaming the branch brings the preview back.
scripts/vercel-deploy-branches.test.mjschecks the rules against a set of real branch names using Vercel's any-true matching, and asserts there's noignoreCommand. It fails without the config.Verify:
Done when: main still deploys both projects, a
-web-or-demo-branch previews the right one, and other pushes create no Vercel deployment.Changelog
main, project-specific branch patterns, non-matching branches, and the absence ofignoreCommand.mainand matching-web-or-demo-branches.Concerns