Next.js Discord

Discord Forum

Is there a way with vercel to deploy code to test environment and have different environments?

Unanswered
Tufted Flycatcher posted this in #help-forum
Open in Discord
Tufted FlycatcherOP
I would like like to push my code up and have it automatically deploy to a test environment. And I can deploy that to a stage environment and then obviously a production environment. What is everyone doing for that, for ease, for a small/medium sized project?

5 Replies

When you make a branch and push to it, vercel will make it a preview deployment
You can add protection to it like ppl having to login to vercel etc
You can also give it certain env variables
When you push it to main, vercel will deploy to prod
You can also assign a subdomain to your staging branch
https://vercel.com/guides/set-up-a-staging-environment-on-vercel