Could I deploy multiple branches in subpath of the same domain?

Hi, I’m trying to deploy multiple versions of document sites:

Version Branch URL
v1.0 v1.0 https://example.com/docs/1.0
v1.1 v1.1 https://example.com/docs/1.1
v2.0 v2.0 https://example.com/docs/2.0

The code base are placed in different branches of the same repository. Is it possible to deploy those sites in the same domain?

Hey there, i think what you might need is a monorepo setup:

Thank you, but it seems that doesn’t support build multiple sites with same domain from branches.

Hey @razonyang

Have you checked out this support guide?

While it is using multiple repositories, you could use the sample principle and deploy each branch to a different site. For instance

doc-v1-site.netlify.app would use the v1.0 branch as the main/production branch.
doc-v11-site.netlify.app would use the v1.1 branch as the main/production branch.
doc-v2-site.netlify.app would use the v2.0 branch as the main/production branch.

Then you use rewrite as explained in the support guide and this documentation to proxy to each from the main site.

1 Like

I didn’t know that, I’ll give it a try. Thank you very much.

Thanks a lot, Netlify proxy meet my case.