Unable to remove preview deploys

Description

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
  • Build tracking is disabled for preview

Screenshot of Issue

You can use the git.deploymentEnabled option to prevent automatic deployment

1 Like

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.

{
  "git": {
    "deploymentEnabled": false
  }
}

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.

{
  "git": {
    "deploymentEnabled": false
  }
}

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.