Deploy Your Website
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.
Create a GitHub repository and push your code
Make sure Gemini CLI is running in your
my-websitefolder. Then say or type this prompt:Say this or copy this promptI 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.
Enable GitHub Pages
- Using Gemini CLI
- Manually on GitHub
Say or type this prompt into Gemini CLI:
Say this or copy this promptNow 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.- Go to your repository on GitHub (e.g.
github.com/yourusername/my-website) - Click Settings (the gear icon tab)
- In the left sidebar, click Pages
- Under Source, select Deploy from a branch
- Choose main branch and / (root) folder
- Click Save
Wait and verify
GitHub needs 1–3 minutes to build and publish your website.
- Wait about 2 minutes
- Open your browser and go to:
https://yourusername.github.io/my-website - Replace
yourusernamewith 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:
Say this or copy this promptCan 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.Verify on GitHub
- Go to your repository on GitHub
- Look for a green checkmark next to the latest commit — this means the deployment succeeded
- Go to Settings → Pages to see your live website URL
How to find your website URL
- Go to
github.com/yourusername/my-website - Click Settings (gear icon tab)
- Click Pages in the left sidebar
- Your live URL is shown at the top:
https://yourusername.github.io/my-website
Troubleshooting
I see a 404 error
- 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.htmlfile in the root (not inside a subfolder) - Go to Settings → Pages and make sure the source is set to the main branch and / (root)
Repository not found
- Make sure the repository is public, not private
- Check your spelling — the URL is case-sensitive
- Run
gh repo listin your terminal to see your repositories
I don't see Pages in Settings
- 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.