How can I deploy my Nextjs app to production in a way that allows me to run E2E tests on a "pre-prod" version before promoting it to prod, similar to using a preview URL without public traffic being directed there?
I am looking for a process where I can validate the app on a test environment first and then seamlessly transition it to production if all tests are successful. Is this workflow feasible?
So far, I have utilized vercel --prod
for deployment, but that only sends the current version directly to production. What I need is to create a production build that enables me to utilize the alias
command to direct traffic to a specific version when needed.
Appreciate any insights you can provide! Thank you!