GitHub Pages

GitHub Pages” are static web websites that you can build directly from your repository. And any time you push a new change from your computer to the remote origin, your GitHub page/website will be updated automatically.

It’s a one-time setting and your pages will be live until you remove the repository. Not last but least, it’s free and fast loading than many shared hosting servers.

Let’s see how you can create one.

Create your first GitHub page

Prerequisite: You should have a static website on your local machine (computer) and a GitHub account.

Create a GitHub repository if you don’t have it already and push your local project to the GitHub repository. If you don’t know, see how to connect a local project with the remote server using Git.

Alright, after you push your static website to the GitHub repository, navigate to the repository. And click on “Settings” from the top menu.

In the left sidebar, click on “Pages” under the “Code and automation” section.

Under the “Build and deployment” section, choose “Deploy from a branch” as the source. Also, choose “master” as the branch & “root” as the folder, and click on “Save.”

Create GitHub page from master branch

That’s it! You just created a GitHub page from your repository.

This might take a minute or two. And you will find your GitHub page in the following URL: https://your_username.github.io/folder_name/

If you are still struggling to create GitHub pages, see the video below.

Learn more about Git

Conclusion

GitHub Pages are a great opportunity to create small & static projects, showcase works, and even build portfolios. The loading speed of the pages is also nice and even better than many paid hosting companies.

You also have the option to add a custom domain name to your GitHub pages but that’s a premium feature. However, most of us don’t need to add custom domains to the pages.