This guide will help you host your website on GitHub Pages using a repository named pages-test
.
- Create a new repository on GitHub, in this example, we are using
pages-test
.
- Ensure your HTML file is named
index.html
as GitHub Pages uses this file as the main page. - Check your HTML file for any external links or references and make sure they use relative paths.
- Use Git to commit and push your
index.html
file to yourpages-test
repository on GitHub.
- Go to your
pages-test
repository on GitHub. - Click on "Settings."
- Scroll down to the "GitHub Pages" section.
- Choose the source branch (e.g.,
main
ormaster
) and select the/ (root)
folder as the source. - Save the settings.
- After saving, GitHub Pages will provide a URL to access your hosted website. It will look something like:
https://yourusername.github.io/pages-test/
.
- Ensure any external resources used in your website are accessible from your GitHub repository.
- It might take a few moments for your site to go live on GitHub Pages after configuration.
Follow these steps to host your website on GitHub Pages. For more information, refer to GitHub's official documentation on Pages: GitHub Pages Documentation.