Add the repository to Github Desktop

  1. If you can’t already see your project folder then add your project folder to github desktop. Write a quick message in Summary then Press commit to queue it up and then Publish/Sync. This will add the site to your github repositories.
  1. Github will allow you to publish project websites for each of your repositories (known as github pages or gh-pages). They will end up being published at yourusername.github.io/repositoryname.

For example, the home for this website is https://poldham.github.io/minute_website/

But, this is where we need to take care. In the image above on the left we can see that next to Branch it says master. Websites are published on the github pages branch (gh-pages) branch of a repository to keep them separate (because your repository data and your project website may be quite different things). So, your website is not yet published.

To publish the website we need to go into Settings in our repository and then scroll down. In the image below, where you see master in your repo change the branch to gh-pages. Your simple website will now build at the address given. You are reading this online so it must do.

If you have forked and cloned this site then all should be good, because the master branch has been deleted leaving only the gh-pages branch. However, if you have started from scratch you will need the procedure above.

  1. Troubleshooting. It can take a few minutes (but not long) for Github to recognise the website. If you see a not found message check three things.