Deploying github repository branches as subdomain with /branch_name using netlify

I deployed a code for documentation written in md format which gets deployed as HTML pages. So main repo (master) from github gets deployed as the site and the branches also .

Domain :

Domain for branch:

How i want is branch domain should be like instead of .

Example :

Branches should get deployed like this.

Any clues how this could be achieved , some addon or plugin.

What you’re looking for is not possible. The reason? You’re trying to deploy inside a directory of a website and because the way Netlify deploys, you can’t add just one file or folder. You need to re-upload the entire website everytime.

Branches on the other hand can also be orphan and might not have any connection with the main branch. Also, they would be built independently than the main branch. Thus, it won’t be possible to publish it to the main branch.

You’ve 2 options:

  1. Build locally and organise the project structure like you want and then upload it.
  2. Use proxy redirects to setup a redirect that will show at Read here: Rewrites and proxies | Netlify Docs
1 Like