Is there a way to create a deployment of my Nextjs app to production but without promoting it immediately to prod? Similar to a preview URL, but without public traffic being routed to that URL.
My use case is that I want to deploy a "pre-prod" app, run E2E tests there, and if they are successful, promote the app to production.
Is this flow possible?
I've used vercel --prod, but that just deploys the current version to production.
I want to create a production build that allows me to then use the alias command to point the traffic to a specific version.
Thanks in advance!
In this case, my opinion, you need to create an "intermediate" solution.
In vercel, you have "dev" "preview" and "production" environments (go to Settings-environment variables). You set some settings to preview env, it's ok for you, you can after "promote to production" your preview version.
Also, you can set up a special branch in git to directly deployment on preview