I currently have a private repo with limited access, for which I’ve set up preview deploys via GitHub Actions that work as intended. I am having a problem because Vercel keeps attempting to deploy a preview, which fails, making CI red.
Steps Taken
I want to prevent these preview deploys, and I’ve tried the following:
The Vercel Toolbar was disabled, and the org and project level
Pull requests & Commit Comments are turned off on the project level
Ignore build step is set to Don’t build anything on the project level
Thanks for the quick response. I’ve created a vercel.json that targets a branch and one that disables all GitHub deploys, as shown below, but I am still seeing the failed deployment on PRs. I am also not clear on why the deployment is failing in the first place; our current setup is one account linked to the GitHub repository with access for management and other outside contributors making PRs.
So I got a hint from this comment which included the following:
Environments -> Preview -> Branch Tracking set to enabled
It appears that when branch tracking is disabled, Vercel doesn’t look to the vercel.json and deploys regardless; however, when branch tracking is enabled, the settings in the vercel.json are respected. When I set branch tracking to enabled, I no longer saw failed deploys in GitHub. My current vercel.json is below.