Check other directories (beyond base directory) for changes

Hey there,

I am ending up with the following message in my builds: 10:29:20 AM: No changes detected in base directory. Returning early from build.

We have the following setup which I am pretty sure causes this error message:

/ → root directory
website/ → the base directory where we build the website
docs/ → the directory with markdown files for our documentation website

Most, if not all changes are done in the /docs/ directory even though we build via the base directory ‘website’. This causes Netlify to not see any changes while there actually are.

My question is: can I somehow configure netlify to also look for changes in other directories so it can still continue building?


hi there,

could you pop a screenshot of your build settings please? there should be a way to pay attention to the files and watch for changes :thinking:

Here you go:

I couldn’t find anything in the settings that can help me.

As mentioned in the main post, I want to watch for changes in the ‘docs’ directory too, but I currently am forced to set the base directory to ‘website’.

Alternatively, maybe I can set the base directory to ‘/’, and make the command be cd website && yarn build?

Hey @Jelledb

You have set website as the base directory, so docs is ignored. If you are only making changes to docs, this explains why no changes to the site are detected during a build

Are the docs supposed to form part of the main site, or a separate site (e.g. and OR and

We do also sometimes make changes in the website directory.

It is a docusaurus project with some overall website configuration such as menus, sidebars, etc in website and all the pages are markdown files in /docs.

Does my solution make sense above where I would do a build command of cd website && .... and I set the base directory to /?

I tried my above “hack” but it does not work since the root directory is not the directory with the package.json hence my dependencies do not get installed.

Does anyone have an idea how I can trigger netlify to look for detected changes in a directory beyond the base directory?

hi jelledb, sorry if you have already tried this, but if website and docs are on the same level, and you have the files you are trying to build from in the root directory, then just having the base directory blank should work. Netlify should pay attention to everything that is nested inside the root, and pay attention to those changes - unless i am misunderstanding (which is definitely possible)

Where is the content in docs getting deployed to? Is it a path (e.g. /docs) a part of the main website? Does the docs project have separate have a separate package.json to that in website?

come to think of it, this might help:

I had a look at these docs and they lead me to the page of “Ignoring builds”. In that document I found my solution and I ended up adding the following line to my netlify.toml which ensures that the build continues when changes in /docs/ are made too:

  ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../docs/"
1 Like

fantastic!! glad we found a solution together!