Next.js Discord

Discord Forum

Build and Deploy with specified environment

Unanswered
JeffBaumgardt posted this in #help-forum
Open in Discord
I have 4 domains in my project. dev, staging, qa and (prod)

I do not have git branches enabled for triggering auto deployments.

I am using CI to build, deploy and alias to the specified domain.

I'm trying to use vercel env pull and vercel pull --environment=development to make sure I pull the correct env vars from Vercel. I see the correct vars in .env.local, running vercel build shows that it's using .env.local.

But for some reason when I do the vercel deploy --prebuilt the production variables are actually used. I think it's because the domains say they are production, and I've been unable to find a way to change that.

Bonus points, I want more than 3 environments worth of variables. It's common for teams to have separate dev from qa and separate from staging.

0 Replies