✏️ 1.1.2.13 Practice: GitHub Pages
Goal: Walk through the process of creating and publishing to a GitHub pages page by publishing one of our previous projects.
Warm Up
- We need to create something called a branch to publish our content on Github pages. We'll learn more about branches later, but for now, what is the specific name we must call the branch in order for Github pages to work correctly?
- What is the easiest way to add new changes to a Github pages site after it's already been published?
AI Support: Stuck on GitHub Pages setup? After trying the steps below, you can ask AI to explain a branch name or publish URL in plain language. Do not ask AI to set up GitHub Pages for you.
Example prompts:
- Weak: "Publish my site for me."
- Strong: "My GitHub Pages site isn't loading. Can you explain what the URL should look like and 2–3 things I should check—without running commands for me?"
Before asking AI, check: Do I have the license for this? See Using AI Responsibly at Fidgetech and How to Ask for Help.
Try asking AI: "What is the
gh-pagesbranch and why does GitHub Pages need it? Can you explain in plain language—without creating the branch for me?"After reading AI's response, explain the concept back in your own words before moving on.
Code
Publish to GitHub Pages
Now that you have learned how to host your web pages on GitHub Pages, go ahead and make your cat homepage and/or dog blog display on GitHub Pages as well. Make sure that each project properly displays for you. If it isn’t working, make sure you have confirmed your email address with GitHub.
Checkpoint
Before moving on, you should be able to:
- Publish at least one project to GitHub Pages
- Name the required branch for GitHub Pages
- Find your live site at
username.github.io/repository-name - Troubleshoot a site that isn't loading (email confirmation,
index.html, branch name)
If you're unsure, re-read the section above or ask AI: "My GitHub Pages site isn't loading. Can you explain what the URL should look like and 2–3 things I should check—without running commands for me?"