GitHub Pages provides a very easy, free way to host static web sites. The steps to use it are:
- Create a GitHub repository.
- Add static assets such as HTML, CSS, JavaScript, and image files.
- Browse the GitHub repository.
- Click “Settings” near the upper-right.
- Scroll to the “GitHub Pages” section.
- In the “Source” drop-down, select “master branch”.
- Wait about 30 seconds.
- Browse
https://{username}.github.io/{repo-name}/.
Here is a simple index.html file that results in a web site
with a perfect Lighthouse score for both desktop and mobile.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Simple Site</title>
<meta charset="utf-8" />
<meta name="description" content="simple site" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
Welcome to my simple site!
</body>
</html>
To make changes to the site:
- Modify existing files and add new ones.
- Commit the changes.
- Push changes to the master branch.
The site will update automatically in about 30 seconds.