How to publish repo site?

Viewed 43

I have published my own site on github with url like https://[username].gtithub.io

Now I want to publish another website (as a portfolio) on github with a repo name say "myrepo". After done my html, I used the same way as I published my first site. It tells me my website should be at https://[username].gtithub.io/myrepo but when I clicked on the site, it shows me back to https://[username].gtithub.io only. I also set my source branch to "main" and document on "root". What am I missing here can someone help?

1 Answers

GitHub recently made some changes to make it easier for you to setup your site in repos! First you want to navigate to your repo, and go to the settings of it.

Go To Settings

Then, once you get there, scroll down until you get to the option that says GitHub pages.

GitHub Pages Settings

Side note: I am using a custom domain, but you can ignore that for now. Once you are there, select a branch, and then it will prompt you to select either the root folder, or the docs/ folder. It may prompt you for the gh-pages branch, if it exist. Once you have selected your desired settings, click save, and your site should go live within a few minutes. In my case, it would be http://thecrafters001.github.io/Redirects

Due to the nature of my site, I have a custom domain, but this is entirely optional.

Related