Skip to main content

How github pages work?

GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website.

Step by step process to publish a website using Github pages:

Step 1

You should have a repository, if you don't go on this page to know how to create a repository.

Step 2

Now if your repository have an "index.html" file, then github understands what you want to do.

Step 3

Go to repository in Github and click on settings.

Screenshot 2022-09-28 103752

Step 4

Click on the pages option on the sidebar menu.

Screenshot 2022-09-28 112517

Step 5

Select the main branch in dropdown menu for branch.

Screenshot 2022-09-28 113353

and hit Save. Your Github pages source is saved.

You can check the process happening in actions tab.

Screenshot 2022-09-28 113847

and when the action gets completed.

Screenshot 2022-09-28 114007

Step 6

Go back to settings > pages and click on Visit site to see the deployment. Screenshot 2022-09-28 114328

That's it. You have successfully deployed your website using github pages 🎉