Next.js Discord

Discord Forum

Wrong git deployment

Answered
Guillaume630 posted this in #help-forum
Open in Discord
My vercel project is configure on the main branch, the probleme is when i deploy a new version in another branch, vercel is still build the project, i just want to deploy the main branch, any idea to solve the probleme ?
Answered by joulev
yeah so if the production domain of your app is test.com, only commits to main will be deployed to test.com, other deployments don't affect this production part
View full answer

11 Replies

if you really want to disable it i think you can use this
Ah okay so each deployment in the deployment page have their own preview, and doesnt affect the whole project that is configure on the main branch right ?
@Guillaume630 Ah okay so each deployment in the deployment page have their own preview, and doesnt affect the whole project that is configure on the main branch right ?
yeah so if the production domain of your app is test.com, only commits to main will be deployed to test.com, other deployments don't affect this production part
Answer
i think you should only disable preview deployments if somehow you reach the free limit for build time
Okay that's nice !
And about the stagging branch you recommand to create another project dedicated to the stagging ?
@Guillaume630 And about the stagging branch you recommand to create another project dedicated to the stagging ?
no. if you want to add another domain for a staging branch just add them in the custom domain section
and assign the git branch for it
then all pushes to that branch will be deployed on that domain
Nice, perfect !
Thanks for the help 😉