Publish Your Own Site For Free on GitHub

by atulkashyap
2272 views
techarge.in

GitHub is not only a great place to store and share your code with others but they also offer free web hosting of your HTML, CSS, and JavaScript projects!

Github is a web-based platform used for cloud-based Git repository hosting services. GitHub eases the process of working with teams and makes it easy to collaborate on projects. Basically, it is a place where you share and store your stuff and host your HTML, CSS, and javascript projects.

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.

Create a GitHub account on github.com

The most important step. Github Site

GitHub signup page

Create New Repository:

-After signing up click on create a new repository. 

Create a repository

Then name that repository, remember that your web URL will have the same name as of your repository name and choose who can see your repository (public and private). Then check the box Initialize this repository with README.

New repository page

After creating the repository:

-Select branch and create a gh-pages branch.

create gh-pages

repository page

After that prepare your files that you want to upload and rename your main HTML page as index.html. Now click on upload files and select your files. Also, remember to commit a message that describes what you are uploading. Then click on commit changes.

Commit changes

Change some settings:

Repository Settings

At repository pages, click on settings and scroll down to the Github pages section. Change none to gh-pages branch by clicking on dropdown and click on save changes. And then you will see the link of your site.

gh-pages branch

It can take as long as 48 hours for your domain to resolve to your GitHub page. However, it is usually pretty quick, so check back in an hour or so.

That’s it. You have just uploaded your site on GitHub. You can share the link of your site to your peers, if you have made it public.

Interested in blogging,
publish your blog with us!

You may also like