Clément Hélardot
January 17, 2022
Host your website on Github Pages
1min read

Did you know that you can host a website on GitHub, for free ?


No ? Then let me show you.


You need to create a repository named yourUsername.github.io and make it public.


yourUsername.github.io In my case, the repo must be named lachouri.github.io .


Then, simply to test it, I am going to create an index.html file with a bit of code and I will push it on github.


Image description


  • Initialize the repo with git init
  • Create a commit with git add . and git commit -m "First commit"
  • Create the main branch with git branch -M main
  • Link your local repo to the git repository with git remote add origin https://github.com/yourUsername/yourRepo
  • Finally push with git push -u origin main

Wait for a minute or so, and go to the following url: https://yourUsername.github.io and 🎉 your website appears.


The website


About

About the author

Ludivine Achouri

Passionate web developer from France


"Do the best you can until you know better. Then when you know better, do better."

Copyright © Achouri Ludivine 2023 | All rights reserved