-
I'm sorry if this has already been asked by others. Is there a way to configure a particular branch not to deploy automatically? If it doesn't, I'll give up, so it's no problem. sorry for my bad English. thx. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 15 replies
-
Hi @siloneco there's no way to turn off deploys per branch, but you can turn off the Git integration altogether with the following config option {
"github": {
"enabled": false
}
} If you have three branches named A, B, and C and you only push to B, then only a single deployment should be made for the B branch. If you push to B one time and 3 deployments are made, then there is a bug. Can you confirm that only a single deployment is being made for a single push? |
Beta Was this translation helpful? Give feedback.
-
Thank you for quick reply. I tried it in the develop branch and waited a minute after pushing it, and it didn't do anything. I think I can do something with this feature. Thank you so much! |
Beta Was this translation helpful? Give feedback.
-
In file vercel.json { |
Beta Was this translation helpful? Give feedback.
-
Is there still no way to only trigger preview builds for pull requests? Netlify has offered this for an eternity. I don't need Vercel running doomed builds for branches that are not ready to at least open a PR for. |
Beta Was this translation helpful? Give feedback.
-
You can enable the "Ignored Build Step" field by referring to the documentation of this feature. If the command returns "0", the build will be skipped. If, however, a code "1" or greater is returned, then a new deployment will be built. So bash script with exit 1; Will let the build proceed. This is quite honestly absurd, you have to wonder how much billable hours vercel gets out of this, the feature is obviously easy to implement considering the existing git integration. |
Beta Was this translation helpful? Give feedback.
-
Yes, you can disable deployments for specific branches through
https://vercel.com/docs/projects/project-configuration/git-configuration |
Beta Was this translation helpful? Give feedback.
-
How do I disable it for every branch except main? |
Beta Was this translation helpful? Give feedback.
Yes, you can disable deployments for specific branches through
vercel.json
:https://vercel.com/docs/projects/project-configuration/git-configuration