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:
In your site dashboard for the specific site you want to configure, go to Settings > Build & deploy > build-settings. The option is labeled Base directory.
Or, your can use a netlify.toml file and set the base dir:
But we always got this error failed during stage 'building site': Deploy directory 'frontend/foo/frontend/foo/storybook-static' does not exist Not sure why but seems the base got included twice for the deploy dir
Hi @zipme, it looks like this bug was introduced in the update that improves monorepo handling. We have an issue filed for it and will let you know as soon as we get things fixed.
This absolutely should work @jayemfonacier and I believe that something else must be at play! If youâre happy with the workaround, great â otherwise, please create a topic and we can delve in on this one.
Hi, I deloyed a website on Netlify. This is a small website with a couple of pages,js and css, which they all live in a âdistâ folder. they are in my repo and the path is like this: dist/index.html
So I changed my Publish directory using Netlify UI to âdistâ. But it doesnât work and Page Not Found is appeared after I click on automatically-generated domain name by Netlify.
What exactly should I write including / or . in Base directory, Build command, and Publish directory fields in Netlify UI?
Hi @luke, Thank you for your reply.
I changed my settings to the things you said, but it doesnât work.
This is my site: friendly-mccarthy-00cc03.netlify.app
Please let me know if I should provide you with more information.
6:55:42 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: 'dist' versus '/dist/' in the Netlify UI
6:55:42 PM: No build command found, continuing to publishing
6:55:42 PM: Starting to deploy site from ''
You will need to deploy your site again for the changes to take effect.
@luke, @Scott. Hi there, I have a similar issue so I decided not to make an extra issue in forums for this.
I got a static (js, css, html only) website at my root folder which also contains a _headers file (no issue with it). But, thereâs a folder named blog at <root>/blog and it is made with hugo - a static site generator. My issue here is how can I deploy hugo commands to build the website for the blog folder only.
I tried to use netlify.toml file in <root>/blog with the following code:-
but for some reason, it isnât working. I donât think thereâs a way to run the environment variable and command in the netlify backend dashboard where thereâs a option but as I said, my main website at root is a static website.