Share Your Projects with GitHub Pages
What is GitHub Pages?
GitHub Pages takes your HTML/CSS/JavaScript files and turns them into a live website on the internet!
Why use GitHub Pages?
Your project becomes a real website.
🔗 You get a URL you can share (like yourname.github.io/project)
Works on phones, tablets, and computers
Completely FREE!
Updates automatically when you change your code
Before You Start - Checklist
You need:
✅ A GitHub account (don't have one? Go to GUIDE 1 and follow steps!)
✅ A repository with your project
✅ A file called index.html in your repository (this is your homepage)
Step 1: Go to Your Repository
Log in to github.com
Click on your profile picture (top right)
Select "Your repositories"
Click on the project you want to publish
Example: Click on my-first-website
Step 2: Open Settings
Look at the top of your repository page:
You'll see tabs: Code, Issues, Pull requests, Actions, Projects, Wiki, Security, Insights, Settings
Click on Settings (it's the last tab with a gear icon ⚙️)
⚠️ Don't see Settings?
Make sure you're logged in
Make sure you're the owner of this repository
You might be looking at someone else's project!
Step 3: Find GitHub Pages Section
In Settings, look at the left sidebar
Scroll down until you see: "Pages"
Click on "Pages"
You're now on the GitHub Pages settings.
Step 4: Activate GitHub Pages
Choose Your Source
You'll see a section called "Source" or "Build and deployment"
Click the dropdown that says "None"
Select: "main" (or "master" if that's what you see)
What is "main"?
It's the name of your code branch
Think of it as the "main version" of your project
Don't worry too much about this - just select it!
Choose the Folder
Next dropdown: "/ (root)"
Keep it as "/ (root)" - this means use all files in the repository
Save!
Click the "Save" button
GitHub is now building your website! 🎉
Step 5: Wait for Your Website (Just 1-2 Minutes!)
You'll see a message:
"Your site is ready to be published at https://yourusername.github.io/repository-name/"
Refresh the page after 1-2 minutes
The message changes to:
"Your site is live at https://yourusername.github.io/repository-name/"
🎊 YOUR WEBSITE IS LIVE!
Step 6: Visit Your Website!
Click on the URL (the https://... link)
A new tab opens with YOUR WEBSITE.
Example URLs:
https://sarah-codes.github.io/my-first-website/
https://alex-developer.github.io/calculator-app/
https://maya-projects.github.io/tic-tac-toe-game/
Share this link with anyone you want to!