Changes to `main` deploy to Preview instead of Production?

Currently I have my Vercel project linked up to its associated GitHub repo. The default branch for this repo is main. Vercel is currently set up to automatically run a deployment to the Production environment whenever a change occurs to the main branch.

I love the auto deployment, but NOT to Production. I would prefer to have the automatic deployments happen to the Preview environment, and then I can promote Preview to Production manually when I am ready.

How do I achieve this in Vercel’s settings?

Following the instructions in this article, the steps seem to indicate how to achieve what I would like to do. However they appear to be outdated, because the settings appear to have been moved around and/or changed since this article was written and I’m not able to figure it out currently.

Hi @jakedemian, welcome to the Vercel Community!

The most commonly used solution is having two branches: main and stage. Every new change is merged into stage and when you are ready you merge it to main. This way Vercel can continue to work as is, making new production deployments for all commits to main.

I hope this was helpful.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.