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

Can I publish multiple branches of a repository on GitHub Pages?

Solved! Go to Solution.

I have already published the master branch of my repo on Github Pages. Can I somehow publish another branch of the same repository so the the url is something like: username.github.io/repositoryname/branch ? Or will I have to create another repository instead of a branch to publish it?

2 Replies
Solution
Pilot Lvl 2
Message 2 of 3

Re: Can I publish multiple branches of a repository on GitHub Pages?

Hi @AnkitaSood

 



Can I somehow publish another branch of the same repository so the the url is something like: username.github.io/repositoryname/branch ? Or will I have to create another repository instead of a branch to publish it?

 

GitHub Pages only lets you configure one publishing source for a particular repository. So in this particular case, you'll need to create a new repository and add the content you'd like to publish with GitHub Pages to that newly created repository.

 

Does that answer your question? Please let me know if I misunderstood you or you have additional questions. 

Ground Controller Lvl 1
Message 3 of 3

Re: Can I publish multiple branches of a repository on GitHub Pages?

Hi there!

 

It's a pity it works that way. In my case, I am maintaining an open source project hosted on GitHub. The project has several major versions (few of them still supported and maintained separately on different branches of the repo). It would be very nice if I could have the documentation of each of those versions/branches published separately.

 

Best,

Thomas