So, let’s see how you can create your own website and deploy it on Github pages for free. In this way, you’ll be able to have your own portfolio website, product website, or any other kind of website online for free with GitHub pages. So, let’s get into the tutorial.
You may also like to read: The solution to cs50 psets 1 credit problem (2022)
Table of Contents
ToggleHow to create a GitHub account?
First of all, you need to have a GitHub account. So if you don’t have an account yet, Here is how you can create a Github account. It is quite easy to do.
1. Go to github.com
2. Click on the sign-up button in the top right corner
3. fill out the form and submit it. (when you prompt to give a username. give a clear and short username because it will be the URL of your website.)
4. Github will send you a confirmation code enter it in the required field and then you’ll get your very own Github account.
How to create an HTML5 website
Now you need a website. You can easily create a website by using a free HTML5 template.
1. Go to www.html5up.net
HTML5UP is a website that provides free html5 templates. They are fully responsive and customizable. You can choose a template from their range of templates and customize it to how you want your website to be. And it is 100% free.
2. download any template that you like. Extract the file to your project folder. You can customize it however you want.
So now you have your very own website with you. Now let’s create a repository to upload your website files.
How to create a repository
1. Log into your GitHub account and click on the plus icon on the right-left corner of the web page.
2. You will end up on a page as below. Your username will have in the owner section. So you need to give a name to your repository.
3. The format of your repository name should be ” <your_username>.github.io “. You can create a repository on this name only once.
4. Add a description if you want to, but it is optional. Leave the code as public and then click on Create repository button.
5. You’ll end up on a page like this. Now you can use the commands on this page to upload your website files into this GitHub repository using the terminal. Or you can simply upload your files to this repository by clicking the uploading an existing file link.
6. Follow that link. Grab all the files of your website and then drag and drop them onto this page.
7. It’ll take some time to upload all the files and after the files are uploaded, click on the commit changes button.
8. Now you are done uploading your files. It will take some time to process your files and after that, you’ll be able to see your files on the repository.
9. Now click on the Settings section and then click on the pages under Code and automation. You’ll end up on the page as above.
10. select your branch as the main and folder as the root, then click on Save.
11. It will take some time and when you refresh the website you’ll see a message saying that your site is like now in the link <Your_username>.github.io. now you can follow the link and see your site is live now.
So, this is how you can create and deploy a website on Github pages. If you want you can buy a custom domain and add that domain to this website too.
So if this helps you, don’t forget to share this on social media.
One Comment