I’m trying to achieve the following deployment workflow in Vercel:
When a PR is raised against the dev branch, it should deploy to a preview domain( DomainA)
When the PR is merged into dev, it should deploy to the production domain (DomainB`).
However, Vercel is not allowing me to assign the same branch (dev) to both a preview and production environment for two different domains at the same time. It seems that a single branch cannot be used in both preview and production environments simultaneously.
Code, Configuration, and Steps that Reproduce This Issue:
I have the following domains configured:
Preview Domain: DomainA
Production Domain: DomainB
Both domains are assigned to the dev branch for production in Vercel Dashboard under Settings > Domains.
When a PR is raised on dev, Vercel doesn’t trigger a deployment to the preview domain (DomainA)
unless the PR is merged into dev. This is not the desired behavior because I want to deploy to DomainA as soon as the PR is raised, and then to DomainB once merged.
I would appreciate any guidance or suggestions on how to achieve this deployment flow with Vercel or if there are any limitations or workarounds I should consider. Thank you!
All these cases are hitting the same core limitation: Vercel prevents multiple environments from automatically deploying from the same branch. This is designed to prevent deployment conflicts, but it can be challenging when you need different domains/environments (like your DomainA and DomainB) to deploy from the same branch.
I’ve shared similar solutions in the other threads, but here are some potential solutions:
Use separate branches as this gives you the cleanest separation of concerns.
preview branch for DomainA deployments
dev branch for DomainB deployments
Use Vercel’s promotion workflow. This maintains your desired staging → production flow.
Deploy to DomainA first
Use Vercel’s promotion feature to promote to DomainB when ready
Set up a custom CI/CD pipeline:
Keep your current branch structure
Use GitHub Actions to trigger appropriate deploy hooks in sequence
This gives you the most control over the deployment process.