Contributors work on develop via PRs; production is main. We only want production builds on Vercel when changes land on main, not a preview for every PR commit.
-
vercel.json→git.deploymentEnabled
In Vercel, any branch not listed used to default totrue(deploy on every push). We set:"*": false— do not auto-deploy arbitrary branches"main": true— only the production branch may trigger deployments from Git
See Git configuration.
-
ignoreCommand→scripts/vercel-ignore-build.sh
Second line of defense: skip the build unless the deployment isVERCEL_ENV=productionon branchmain. Preview deployments (VERCEL_ENV=preview) are canceled even if a job is queued. -
GitHub Actions (this repo) runs on PRs for lint/test; that is not Vercel. No change to Vercel when you only push a PR.
In the Vercel project Settings:
- Git → Production Branch:
main - Git: turn off Pull Request comments from the Vercel bot if you do not want comments on every PR (optional; does not affect deploys).
- Confirm Ignored Build Step is set to use the command from
vercel.json(or match behavior: only production onmain).
Canceled builds from the ignore step may still count toward deployment limits. Keeping git.deploymentEnabled correct minimizes queued jobs.
If you later want preview URLs for develop or PRs, relax git.deploymentEnabled and the ignore script together and document the new policy for contributors.