Skip to main content
Your website works on your computer. Let’s put it on the internet — for free.
Your website address will be yourusername.github.io/my-website — replace yourusername with your GitHub username.
1

Create a GitHub repository and push your code

Make sure Gemini CLI is running in your my-website folder. Then copy and paste this prompt:
Copy this prompt to create your GitHub repository
I want to put this website on GitHub so I can host it with GitHub
Pages for free. Please do the following:
1. Initialize a git repository in this folder
2. Create a new PUBLIC repository on my GitHub account called "my-website"
3. Add all my files and make the first commit
4. Push everything to the new GitHub repository
5. Show me the URL of the repository when you're done

I already have git and the GitHub CLI (gh) installed and logged in.
The repository must be public for free GitHub Pages hosting. This is standard practice for personal websites — your code will be visible to others, just like most websites on the internet.
2

Enable GitHub Pages

Copy and paste this prompt into Gemini CLI:
Copy this prompt to enable GitHub Pages
Now I want to enable GitHub Pages for this repository so my website
goes live on the internet. Please:
1. Enable GitHub Pages, deploying from the main branch
2. The website files are in the root of the repository (not a subfolder)
3. Tell me the URL where my website will be available
4. Check if the deployment is successful

My GitHub username is [your-username].
Replace [your-username] with your actual GitHub username.
3

Wait and verify

GitHub needs 1–3 minutes to build and publish your website.
  1. Wait about 2 minutes
  2. Open your browser and go to: https://yourusername.github.io/my-website
  3. Replace yourusername with your GitHub username
Seeing a 404 page? Don’t worry — wait another minute and refresh. First deployments can take up to 3 minutes.
You can also ask Gemini CLI to check for you:
Copy this prompt to check deployment status
Can you check if my GitHub Pages deployment is complete? Please check
the deployment status of my repository and tell me when my website
is live. Also give me the exact URL to visit.
4

Verify on GitHub

  1. Go to your repository on GitHub
  2. Look for a green checkmark next to the latest commit — this means the deployment succeeded
  3. Go to SettingsPages to see your live website URL
  1. Go to github.com/yourusername/my-website
  2. Click Settings (gear icon tab)
  3. Click Pages in the left sidebar
  4. Your live URL is shown at the top: https://yourusername.github.io/my-website

Troubleshooting

  • Wait a few minutes — first deployments take up to 3 minutes
  • Make sure the URL is correct: https://yourusername.github.io/my-website
  • Check that your repository has an index.html file in the root (not inside a subfolder)
  • Go to Settings → Pages and make sure the source is set to the main branch and / (root)
  • Make sure the repository is public, not private
  • Check your spelling — the URL is case-sensitive
  • Run gh repo list in your terminal to see your repositories
  • GitHub Pages is only available for public repositories on the free plan
  • If your repository is private, go to Settings → General → Danger Zone → Change visibility to public
Your website is live! Share the link with friends, family, and on LinkedIn. You built this!
Want to keep improving your website? Head to Keep going for ideas, update instructions, and next steps.