How to deploy site from a sub folder inside the parent folder

the main website is connected to the parent folder of github which automatically gets deployed. But now I am creating a sub-domain and want to automate the process of deploying in this too. But want to keep the folder containing files of the new sub-domain in the parent folder only

So how shall I connect the sub-folder in the parent folder(on github) to the sub-domain?

Am I on the right track, or i have to do something else to connect

You can set up the site exactly the same as the main website, and then set the base directory to the sub folder:

thanks @tomrutgers read it, but i have some questions
will i need to edit netlify.toml and if yes then how

and is there any easier way than editing netlify.toml?

You can make these changes in the build settings of the Netlify UI

do i have to add the filename in base directory?

The name of the subfolder, yes


i have saved the name of base directory

But here its showing this only

I don’t think the current repository parameter is updated if you set a base url. It should work regardless. Does the blog-ws folder include static html or a static site generator? You’ve set the Publish directory to blog-ws as well, so Netlify will look for content in blog-ws/blog-ws. You should probably remove either one of them.

the folder contains html files

i just wrote in the base directory and netlify was automatically writing in the publish directory; I even tried removing that, but was unable to do so

@tomrutgers Kindly tell what should i do next

Hi @Samrridh,

I think the problem can be easier if you share your repo and tell us what folder exactly you wish to deploy.

actually its a private repo, but i can surely share the ss which would definitely help you understand my problem
image
image
this is the main site and I want it to be deployed from ‘github.com/Samrridh/The-Space-Dust’ only

but I that the blog site(subdomain) should be uploaded from ‘github.com/Samrridh/The-Space-Dust/tree/master/blog-ws
image

I hope I have made my query clear, if not then I am happy to provide any other info related to this

From what we can see, it appears that the blog-ws folder doesn’t have an index.html. However, you do have a blog.html. Renaming that to index.html should solve this.

2 Likes