[Common Issue] What if my project folder is not the root of my git repository?


There are some projects that live in a folder instead of the root of your git repository. If you need to deploy your site from a subdirectory, there are two ways to do it:

  1. You can set this in the UI:

In your site dashboard, go to settings > build &deploy > build-settings. The option is labeled “Base directory”.

  1. Or your can use a netlify.toml file and set the base dir:

base = "subDirectory"
publish = "subDirectory/dist/"
command = "npm run build"

Now, your builds will work from the subDirectory folder mentioned above! If you have any issues, comment below.