Failed to deploy branch name has [@]mark with GitHub integrations on Vercel.

Published by @SoNiceInfo at 4/5/2020

Using GitHub integratioon on Vercel make your service shipping faster.
But you can't include [@]mark in your branch name.
The deployment will be failed.

Error Detail

Build failed with github integration.
Environment Variable "NOW_GITHUB_COMMIT_REF" references Secret "develop", which was deleted. Remove the Environment Variable or add the Secret again.

The branch name will be in the NOW_GITHUB_COMMIT_REF based on the Vercel document,

`NOW_GITHUB_COMMIT_REF` The branch that the deployment was made from.
Vercel Now could missing [@] mark in the variable.

With Now command, No problems.

USERNAME@Device|~/PATH/TO/PROJECT on @develop
> now
Now CLI 17.1.1
🔍  Inspect: [3s]
✅  Preview: [copied to clipboard] [26s]
📝  To deploy to production ( +1), run `now --prod`
📝  Project settings are not applied because `builds` are used.

You can deploy the service with now command without problems.


There are 2 workaounds. (I don't know the details of the integration between Vercel Now and Github, though, so it's a cop-out.)

  1. Do not use [@] mark in the branch name.
  2. Use now command.

Personally, I decided not to use [@] mark in the branch name.
If you leave the @ mark on, there's an ❌ left when you merge to the master, which is weird.