Vercel Custom Environments branch tracking not triggering deployments

I don’t know if I’m misunderstanding how this is supposed to work or not.

I’m trying to create a few custom environments, I’m on a Pro plan.

Environment Mapping

  • Production: master
  • Staging: staging
  • Develop: dev

Current Behavior

I’ve configured the branches in “environments” in the Vercel Dashboard for staging. Production works fine, no issues there.

Develop Environment

If I try to add branch tracking to Develop there are no options. I can’t enable it or even assign a branch to it. In the Environments page it just says:

Accessible via CLI

If I click into it, there are no options besides environment variables. Again, no way to enable the branch tracking or to change its configured branch or even to change its domain name.

Staging Environment

For Staging it’s a bit different. Branch tracking option is there, branch selection is there and is set to my staging branch, but it is still not deploying anything from the staging branch.

The Issue

The only way I can seem to get any other branches to deploy is to enable the Preview environment, which obviously deploys everything (all branches) and is not what I need.

Any ideas? Or am I missing something?

It never fails. I always seem to figure something out after 4 hours of struggling, then as soon as I post I get it.

It seems maybe the branch tracking doesn’t “catch” on inital setup. I manually created a deployment from my git reference (see Deploying Git Repositories with Vercel ) and staging is now working (even with new pushes to the branch)

I still don’t know what the deal is with Development but I don’t actually plan to use it. Just during this mess with trying to get staging going I noticed the weirdness.

1 Like

I’m glad you figured it out @rwslippey and thanks for sharing your solution here.

The Development environment is only to be used for local development. For example, when working with vercel dev.