Tech Notes

Git & GitHub for Beginners

GitHub Pages

How to Deploy Your Site Using GitHub Pages

This, to me, was one of the trickiest things to figure out as a beginner to coding and web development. So I learned to follow the steps which I found on The Odin Project and after I had those down I was able to understand it better.

Once you have pushed your repo to GitHub, then you can publish the page to the web using GitHub Pages. You must have an index.html file to do this.

Follow these steps:

  • On GitHub, navigate to the repo you want to publish
  • Click on Settings
  • On the settings page, click on Pages in the left menu
  • Under Source change it to main
  • Click Save
  • And that is it, your website is now online and you can view it by clicking the link where it says 'Your site is ready to be published link_to_site'. You can share this link with anyone you want so they can visit your site too.

    As a note: It may take a few minutes for your site to go live!

    Another thing you can do is go back to your repo's page and go to the About settings, add the link to your website there and it will show up on your repo. Very nifty!

    This is just the beginning of what you can do with GitHub pages, but I am just giving you the basic info needed to publish your site, and it's free!