Reputation: 29116
Few years ago I used to use a separate orphan branch gh-pages
to publish my website. This was a good way to not pollute my branch with generated artifacts.
I noticed yesterday that the gh-pages option is not available anymore. Instead I have only these two options:
I did not find any documentation about that on GitHub so I ask my question here:
Upvotes: 3
Views: 2302
Reputation: 4484
Yes it is possible to create a gh-pages
branch, put your index.html
(or what have you) there, push it to your GH remote, and the access your website. Once you do that, on your repo, there will be a tab with Environment
where you will be able to access your deployment and see it. You don't even have to enable the gh-pages
option in the GitHub settings menu!
While it is strange that this option is lacking in the settings menu, it is still available to use this functionality and is well documented here.
What's even more interesting is that after I tested this and created my very simple GitHub page for one of my repos, the option TURNED ON in the settings menu and is available once you have such a branch :)
Edit:
So this might be a bug with GitHub currently
It looks like this is not a bug in GitHub, but rather they are moving towards explicitly managing GH Pages through a user-defined branch and a user-defined directory. Their documentation, namely steps 3 and 4, show that clearly.
Anyhow, carry on with your branches without worries!
Upvotes: 5