How to Set Up GitHub for Hosting Static HTML Pages
1. Create a GitHub Account
- Go to https://github.com.
- Click Sign Up.
- Follow the steps to create an account (choose a username, email, and password).
- Verify your email address.
2. Install GitHub Desktop
- Go to https://desktop.github.com and download GitHub Desktop for your operating system.
- Install the application following the on-screen instructions.
- Open GitHub Desktop and sign in with your GitHub account.
3. Create a New Repository
- In GitHub Desktop, click File > New Repository.
- Give your repository the name
csc336-fall2025.
- Choose a local folder for the repository on your computer.
- Click Create Repository.
4. Add Your HTML File
- Move your
index.html (and any other files) into the local repository folder you just created.
- In GitHub Desktop, you will see the changes listed under Changes.
- Write a short commit message (e.g., "Add initial index.html") and click Commit to main.
- Click Push origin to upload your files to GitHub.
5. Enable GitHub Pages
- Go to your repository on GitHub.com.
- Click the Settings tab.
- Scroll down to the Pages section.
- Under Branch, select
main and click Save.
- After a minute, GitHub will provide a live URL for your site.
6. Visit Your Site
Your site will be live at:
https://<your-username>.github.io/csc336-fall2025/
Example: https://mtreanor.github.io/csc336-fall2025/
Tips
- Your main page must be called
index.html.
- Any time you update files locally, commit and push via GitHub Desktop, and your site will update automatically.