Setting up GitHub Pages
Alright, I need to guide through setting up GitHub Pages step-by-step. First, create a GitHub repository. Then, go to the repository settings and scroll down to the GitHub Pages section. Choose the branch you want to publish (usually "main" or "master"). After that, save the settings, and your site will be live at the provided URL. You can add your HTML, CSS, and JS files to the repository to customize the page. Simple, right? Nice, this will look great as a live site. Let’s walk it step by step.
1. Prepare your project files
- Create a folder on your computer, e.g.
senior-banner-site. - Inside it, create a file named
index.html. - Paste your full HTML code (with banner, etc.) into
index.html. - If you use images (
banner.png,r1.jpeg, etc.), put them in the same folder (or in subfolders and update paths accordingly).
Your folder might look like:
index.htmlbanner.pngr1.jpegr2.jpegevents.csv(if you use it)
2. Create a GitHub repository
- Go to github.com and log in.
- Click “+” → New repository.
- Repository name: for example
senior-community-site. - Keep it Public.
- Don’t worry about adding files here yet (we’ll push from your PC).
- Click Create repository.
You’ll now see a page with git commands like git init, etc.
3. Connect your local folder to GitHub
On your computer:
Open Terminal / Command Prompt / Git Bash.
Navigate to your project folder, e.g.:
cd path/to/senior-banner-siteInitialize git:
git initAdd all files:
git add .Commit:
git commit -m "Initial commit"Add the GitHub remote (copy the URL from your repo page, e.g.
https://github.com/yourname/senior-community-site.git):git remote add origin https://github.com/yourname/senior-community-site.gitPush to GitHub:
git branch -M main git push -u origin main
Now your index.html and images are on GitHub.
4. Enable GitHub Pages
- Go to your repo on GitHub:
https://github.com/yourname/senior-community-site. - Click Settings (top bar).
- In the left sidebar, click Pages (sometimes under “Code and automation”).
- Under “Source”:
- Select Branch:
main - Select Folder:
/root
- Select Branch:
- Click Save.
GitHub will build your site. It usually takes 30–60 seconds.
5. Get your live URL
On the same Pages settings page, you’ll see a message like:
Your site is live at
https://yourname.github.io/senior-community-site/
Open that URL in your browser — your banner site should be live.
6. Update the site later
Whenever you change index.html or images:
Save the file.
In terminal:
git add . git commit -m "Update banner" # or any message git push
GitHub Pages will auto-update in a few seconds.