I’ve read just about every build ignore configuration thread on here but unfortunately, nothing worked, so I’m opening this.
We have a monorepo that our site “unruffled-benz-43c2e1” is deployed from.
Our netlify.toml looks like this:
cat netlify.toml [build] base = "ui/packages/app/website" ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ." command = "yarn && yarn run build" publish = "out"
Previews appear to work, but whenever we merge a PR into the repo then builds are always canceled, supposedly because they are being ignored. Here’s a build output:
2:40:05 PM: Build ready to start 2:40:16 PM: build-image version: 6c366b9e0cc38bb3f3a40b7951f398b33cac286d 2:40:16 PM: build-image tag: v3.8.1 2:40:16 PM: buildbot version: d6f7e5fc881fb3682c2d42eb968d84e9b04dfca0 2:40:16 PM: Fetching cached dependencies 2:40:16 PM: Failed to fetch cache, continuing with build 2:40:16 PM: Starting to prepare the repo for build 2:40:17 PM: No cached dependencies found. Cloning fresh repo 2:40:17 PM: git clone <redacted> 2:40:20 PM: Preparing Git Reference refs/heads/main 2:40:21 PM: Parsing package.json dependencies 2:40:21 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: 'ui/packages/app/website' versus '' in the Netlify UI 2:40:21 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'ui/packages/app/website/out' versus '' in the Netlify UI 2:40:21 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'yarn && yarn run build' versus '' in the Netlify UI 2:40:21 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF .' 2:40:21 PM: User-specified ignore command returned exit code 0. Returning early from build. 2:40:21 PM: Creating deploy upload records 2:40:22 PM: Failed during stage 'checking build content for changes': Canceled build due to no content change 2:40:22 PM: Finished processing build request in 5.600399345s
Side note: it’s really hard to understand what the value of
CACHED_COMMIT_REF is, it would be great if there was a way to inspect the value (build command doesn’t work because the build is canceled before it gets to that point).