Creating a GitHub Pages Website
A beginner-friendly guide to a free static web hosting for education!
Configuring a website on GitHub Pages is one of the easiest things to do. I'm gonna chart the process out in simple words -
To deploy a website on Pages, you would obviously need a website (duh!). The reason why I've put this obvious thing on the list is to stress on the fact that you need a static website, not a server-side rendered one. By static, I mean a website which is composed ONLY of HTML, CSS & JS. If you are using a JS framework, you will need to build the source code into static HTML before deploying.
Since Pages is offered by GitHub, so we're going to need a GitHub repository to store our HTML files. Creating a repo is quite simple, and usually involves the following steps:



That's it! You'll have a new repository ready to be used.
Now as the repo is ready, let's send some code over! Navigate to your local project folder and open up a git bash. Then run the following set of commands
# initialize git repo locally
git init
# link the local repo with your github repo
git remote add origin https://github.com/[username]/[reponame].git
# add all files to git
git add .
# create a commit
git commit -m "Initial commit"
# push it over!
git push origin master
Note that you can run these commands on a terminal too if you have configured your git's path correctly.
Now, if you open the repository on GitHub, it'll show you your files. Make sure that the homepage is saved by the name index.html and is not placed inside any directory, it should be in the root of the repo
All that we did till now was to prepare the repo for being served via Pages. Now comes the relevant part, of configuring pages on the repo. Follow these steps:



That's all! Your repo will not be built upon, and then deployed to the domain allotted to you.

Note that I have configured a custom domain, so my website is served at that domain. Normally, GitHub Pages provides a generic subdomain to every user, which will be displayed to you when you configure your site
So that was all needed to set up a GitHub Pages website! But that's not all about Pages. We'll be covering source selection and domain configuration in the following tutorials so that you may be able to ship quality websites with nothing but a simple server offered by Pages!