I’ve recently noticed that builds are automatically cancelled when there are no content changes. Generally this is great, but I am now trying to deploy a new branch that is virtually identical to the master branch, and builds are being cancelled for this same reason. Build log:
1:58:52 PM: Build ready to start
1:58:54 PM: build-image version: 342853e31ef590be8195dfbea64bbc4657de7b6b
1:58:54 PM: build-image tag: v3.3.16
1:58:54 PM: buildbot version: 0ffb969a1fc5a7aa9d2a93dd77dd40a990576807
1:58:55 PM: Fetching cached dependencies
1:58:55 PM: Failed to fetch cache, continuing with build
1:58:55 PM: Starting to prepare the repo for build
1:58:55 PM: No cached dependencies found. Cloning fresh repo
1:58:55 PM: git clone https://github.com/stufinn/AlbertaBound
1:58:56 PM: Preparing Git Reference refs/heads/demo
1:58:58 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘web/public’ versus ‘public’ in the Netlify UI
1:58:58 PM: No changes detected in base directory. Returning early from build.
1:58:58 PM: Failed during stage ‘checking build content for changes’: Canceled build due to no content change
1:58:58 PM: Finished processing build request in 3.437775397s
Hi @stufinn and sorry to be slow to get back to you! The only way to force that build will be to create a custom ignore command as mentioned in the article I link below, which is at least changing one file in your source repo, even if not the source of the project itself. So you may find it easier to make a dummy commit inside of the base directory, not sure!
You should be able to get away with this in your netlify.toml file:
[build]
ignore = "/bin/false"
this will cause the “skip the build?” check to always say “DON’T SKIP”. You can/should remove that setting once you’ve gotten once successful build, otherwise we’ll always-never skip builds
It would be great if there was a way to force a build manually from the Netlify UI instead of making a dummy commit. Are there any plans for that functionality?
edit: Seems like you can add a webhook and ping it manually to force a build.
This feature is problematic. I have a repository where the bulk of the source code of a library lives in /src. However, the app that I’m deploying on Netlify lives in /demo, and it uses files from /src/. However, Netlify is configured to have it’s base directory be /demo, and so when I change files in /src Netlify doesnt’ detect any changes and refuses to build/deploy.
This is quite frustrating, as obviously plenty of changes are being made in /src.
I think Netlifty should check the entire repository for changes, not just the configured base directory.
Or if that’s not feasible, it should do a build, check the contents of the output/dist folder, deploy or not based on whether those files have changed. That’s the real test.
Is the above solution not working which encouraged you to reply in this thread or are you simply suggesting a change in the underlying feature? If it’s the latter, that’s not meant to change. A major chunk of users would prefer not having to pay for build minutes when there’s nothing changing in the folder they wish to deploy on Netlify.