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 repository owned by your user account that's named
<user>.github.io
- Now create a folder named
<user>.github.io
in your local directory - Copy your project files (css or html or javascript) into that folder. For examples:
- Open Git Bash in that same folder
- Now type the bellow git commands in Git Bash to push the local files to git repository
- git init
- git add .
- git commit -m “initial commit"
- git remote add origin <Github repository url>
- git push origin master
- Now browse your static web site using
<user>.github.io