Wrong git deployment
Answered
Guillaume630 posted this in #help-forum
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 part11 Replies
@Guillaume630 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 ?
all branches and PRs are deployed to the Preview environment (i.e. they don't take the prod domain) so you don't need to disable it
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 partAnswer
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 😉
Thanks for the help 😉