Home
Support Forums

How to Prevent Deploy Previews for Renovate PRs?

I’m trying to reduce build minutes by eliminating deploy previews for Renovate PR branches. I’ve added the following to all my netlify.toml files:

[build]
  # Ignore Renovate PRs
  # @see https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times/
  ignore = "git log -1 --pretty=%B | grep bot@renovateapp.com"

However, even with that, I still see preview deploy builds for every Renovate PR:

Hey there, @Scott_Vandehey :wave:

Thanks for reaching out, and welcome to the Netlify Forums! Good question. I think this thread will help you find a workaround:

Give that a read and let me know if it gets you on the right track!

Thank you!

That thread, unless I’m missing something, ultimately recommends the use of the ignore property in the Netlify config file, which is what I’m doing, and it’s not working?

Based on this thread it sounds like the ignore option only works with a script.

I’m now trying to exclude the builds by adding the following to my renovate config:

"commitBody": "[skip netlify]"

Hi @Scott_Vandehey,

I do believe ignore would help you get the job done, but you should check for the git log to see if the script is actually returning an exit code of 0.

But yes, instead of that, using [skip netlify] is a better option as it’s way easier.