Example failing deploy - https://app.netlify.com/sites/thoughtbot-benefits/deploys/5e73d82193bbe3000ac0512c
It’s a private repo on GH so I can’t provide link to it, but the thing happening is that the CI status reported back by Netlify is showing up as failing on GH on builds where the “ignore” instruction tells Netlify to not deploy.
The repo in question has a bunch of folders in it and we only want to build when the content in the
/benefits/ folder changes. There is a
/docs/ dir which is set up as the base dir on Netlify and has this section in it’s netlify.toml
base = "docs"
command = "bin/prepare_build.sh && bin/build"
ignore = "git diff --quiet HEAD^ HEAD -- ../benefits/ ."
publish = "_site"
The intention is to only publish the site when there’s been a change within
benefits dir, and to ignore other changes to content elsewhere in the repo.
4:37:53 PM: Build ready to start
4:37:56 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
4:37:56 PM: build-image tag: v3.3.7
4:37:56 PM: buildbot version: 11918e084194721d200458438c92ff8180b3b56c
4:37:56 PM: Fetching cached dependencies
4:37:56 PM: Starting to download cache of 458.1MB
4:37:59 PM: Finished downloading cache in 2.664932051s
4:37:59 PM: Starting to extract cache
4:38:06 PM: Finished extracting cache in 7.165542338s
4:38:06 PM: Finished fetching cache in 10.037521401s
4:38:06 PM: Starting to prepare the repo for build
4:38:07 PM: Preparing Git Reference refs/heads/master
4:38:09 PM: Found Netlify configuration file netlify.toml in build directory docs
4:38:09 PM: Found Netlify configuration file(s). Overriding site configuration
4:38:09 PM: Found Netlify configuration file in base dir docs. Overriding previous configuration file.
4:38:09 PM: Found Netlify configuration file in base directory: docs. Overriding existing configuration
4:38:09 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet HEAD^ HEAD -- ../benefits/ .'
4:38:09 PM: User-specified ignore command returned exit code 0. Returning early from build.
4:38:09 PM: failed during stage 'checking build content for changes': Canceled build due to no content change
4:38:09 PM: Failing build: Failed to check build content change
4:38:09 PM: Finished processing build request in 13.228496511s