Next.js Discord

Discord Forum

Trigger deployment on spcefic branches only

Answered
Kapatid posted this in #help-forum
Open in Discord
How do I make my project in Vercel to only trigger certain branches like production, staging, development, etc.

I saw this guide https://vercel.com/docs/projects/project-configuration/git-configuration#git.deploymentenabled but I need everything to be disabled by default.

4 Replies

Answer
@joulev use ignore build step: <https://github.com/orgs/vercel/discussions/1339>
Thick-billed Kingbird
The current workflow as I (mis)understand it is mildly unintuitive.

Is there no way to explicitly declare which branch you want to deploy from start to finish? Without deploying "everything" first then paring down . . . ?

As it stands, I currently just use the CLI to manually deploy specific branches as needed, but it would be nice if there was a way (or if I understood how) to explicitly say "whenever I push X branch, update this project" with zero hoops to jump through . . . basically an "inclusive" mechanism, not an "exclusive" mechanism. 🤔