Ignore Deploy Previews

Hello,

I’m trying to optimize build minutes in our account, and I’m trying to find a way to tell Netlify NOT to build a deploy preview for certain PRs. My repo is currently configured to Automatically build deploy previews for all pull requests.

I’ve tried using the [skip ci] tag in the commit message, and I’ve also added an ignore config to my netlify.toml file as described here, but Netlify is still building deploy previews for new PRs. Do these methods work for deploy previews or only for deployments to the main branch? Any other methods you would recommend optimizing build minutes if deploy previews are the only feature we actively use?

Thank you.

1 Like

Should work for any commit. Could you link me to the logs in our UI for a deploy which shouldn’t have happened so I can take a closer look?

I am experiencing the same problem.
After reading https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times/ and https://docs.netlify.com/configure-builds/file-based-configuration/#ignore-builds

An exit-code of 0 indicates that the build should return early.

Latest deploy preview build which should be ignored: https://app.netlify.com/sites/unibeautify-api/deploys/5f2ee4981c9fc20009b991d0
For Pull Request: https://github.com/Unibeautify/unibeautify/pull/266

My Netlify configuration: https://github.com/Unibeautify/unibeautify/blob/b8a89bf5fb417c5fa612491e75383c5ab899c383/netlify.toml#L2

I’ve confirmed the command works locally on this branch and returns 0.

Any help would be greatly appreciated! Otherwise bot Pull Requests are pushing my build times over the edge and I’ll be forced to switch off of Netlify. Hopefully I can find a way to fix this! Thank you in advance!

You do not have the prerequisites for this feature to work satisfied, so no surprise it isn’t :slight_smile:

This requires that you upgrade to the latest build image, here: https://app.netlify.com/sites/unibeautify-api/settings/deploys#build-image-selection

Don’t do so unless you are pretty sure you are ready to move forward, since there is no moving back!

Once you have a site with the newer build image set up, let me know if it still isn’t working, please!