Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

Serve pages from different branch from same repo ?

Solved! Go to Solution.

Is there any way where we can have multiple pages in different branch and we can host it through git Hub pages from one repo.
eg 
the documentation we want to show there will be stored as HTML in 2 branches
master/docs and develop/docs

As per docs we can have it in master, master/docs or gh-pages branch.

But still want to confirm if there is any way to.

2 Replies
Solution
Community Manager
Message 2 of 3

Re: Serve pages from different branch from same repo ?

If you're asking if you can host two GitHub Pages sites from the same repository, then no. You can only host one GitHub Pages site per repository.

 

If my understanding is incorrect, can you give some more details as to what it is you're trying to do?

 

Thanks!

Highlighted
Commander Lvl 1
Message 3 of 3

Re: Serve pages from different branch from same repo ?

I'm pretty sure the request is (essentially) for links from different branches from a single repo.

 

E.g.

<a href="https://github.com/user/repo/raw/master/docs/doc1.html>

and

<a href="https://github.com/user/repo/raw/develop/docs/doc1.html>

 

where 'master' is the master branch, and 'develop' is another branch, both in the same repo.

 

I've not tried this myself or if there is some other link style that could be used.

 

 

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!