GitHub Pages static site hosting - setup, configuration, custom domains, Jekyll, and deployment
Use when working with GitHub Pages static site hosting, generated from official GitHub documentation.
This skill should be triggered when:
| Type | Repository Name | URL |
|------|-----------------|-----|
| User site | <username>.github.io | https://<username>.github.io |
| Organization site | <org>.github.io | https://<org>.github.io |
| Project site | Any name | https://<username>.github.io/<repo> |
main, gh-pages)/ (root) or /docs folder# Create repository named <username>.github.io for user site
# Or any name for project site
# Add index.html or index.md
echo "# Hello World" > index.md
git add index.md
git commit -m "Initial GitHub Pages site"
git push
# Add CNAME file to repository root
echo "example.com" > CNAME
git add CNAME && git commit -m "Add custom domain" && git push
DNS Configuration:
<username>.github.ioGitHub IP addresses for A records:
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
# _config.yml
title: My Site
description: A GitHub Pages site
theme: minima
plugins:
- jekyll-feed
- jekyll-seo-tag
# .github/workflows/pages.yml
name: Deploy to GitHub Pages
on:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
# Your build commands here
npm run build
- uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v4
id: deployment
# Add .nojekyll file for non-Jekyll static sites
touch .nojekyll
git add .nojekyll && git commit -m "Disable Jekyll" && git push
GitHub provides workflow templates for:
This skill includes comprehensive documentation in references/:
Use view to read specific reference files when detailed information is needed.
Start with references/getting_started.md for foundational concepts on creating your first GitHub Pages site.
See references/custom_domains.md for DNS configuration and HTTPS setup.
Check references/jekyll.md for theme customization and Jekyll-specific features.
Review references/troubleshooting.md for common issues like 404 errors.
To refresh this skill with updated documentation:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer