Next.js Discord

Discord Forum

Vercel Deploying Non Master Branch

Answered
German yellowjacket posted this in #help-forum
Open in Discord
German yellowjacketOP
So I have a master (default branch) and all the other ones. My friend finished working on his branch (main-search) and pushed to his branch but did not submit a pull request. Then Vercel attempted to redeploy the whole site but using his branch (main-search) and it fails because his branch is not ready for deployment. Under Project Settings > Git > Production Branch I have the Branch Name set as "master" not sure why it attempts to deploy using his branch. If anyone knows please let me know. Thanks.
Answered by joulev
vercel deploys all branches, but only the production branch gets deployed to production deployments (with your main domain and whatnot). other branches only get deployed to [preview deployments](https://vercel.com/docs/deployments/preview-deployments), basically there for everyone in your team to view how the web app would look like when that branch is merged to main/master.
View full answer

3 Replies

Answer
build failures in branches that are not ready yet are expected, you can simply ignore those build failures – or if you want to skip building that branch, use vercel.json https://github.com/vercel/vercel/discussions/4307
German yellowjacketOP
thnx