Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aviz85 avatar

Gh Pages Deploy

  • 296 installs
  • 44 repo stars
  • Updated July 8, 2026
  • aviz85/claude-skills-library

gh-pages-deploy is an agent skill that publishes static docs and frontend sites to GitHub Pages for developers who need a public URL via gh CLI with correct branch, build output, and Actions workflow.

About

gh-pages-deploy is version 1.0.0 agent skill by aviz85 in claude-skills-library for deploying static or interactive frontend content to GitHub Pages using the GitHub CLI. It activates when developers want to publish, share, or make browser-based projects publicly accessible—demos, prototypes, visualizations, landing pages, portfolios, documentation, interactive tools, or games—not only when someone explicitly says website. The skill covers prerequisites like gh installation, correct branch selection, build output paths, and GitHub Actions workflow setup for a public launch artifact. Developers reach for gh-pages-deploy whenever content needs a stable shareable URL without standing up separate hosting infrastructure.

  • GitHub Pages branch setup
  • Static build output paths
  • GitHub Actions deploy workflow
  • Custom domain basics
  • Post-deploy verification

Gh Pages Deploy by the numbers

  • 296 all-time installs (skills.sh)
  • Ranked #335 of 1,437 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aviz85/claude-skills-library --skill gh-pages-deploy

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs296
repo stars44
Last updatedJuly 8, 2026
Repositoryaviz85/claude-skills-library

How do you deploy a site to GitHub Pages?

Publish static docs or marketing sites to GitHub Pages with correct branch, build output, and Actions workflow when preparing a public launch artifact.

Who is it for?

Frontend developers publishing demos, docs, portfolios, or landing pages who want a public GitHub Pages URL via gh CLI.

Skip if: Teams needing server-side rendering, databases, or private hosting who cannot use public GitHub Pages static hosting.

When should I use this skill?

The user wants to publish, share, or deploy HTML, CSS, JS demos, docs, or landing pages to a public GitHub Pages URL.

What you get

GitHub Pages live URL, configured deployment branch, build output publish path, and GitHub Actions workflow for static hosting.

  • GitHub Pages deployment workflow
  • Public site URL

By the numbers

  • Skill version 1.0.0 in metadata

Files

skill.mdMarkdownGitHub ↗

GitHub Pages Deployment

Deploy static frontend websites to GitHub Pages using the GitHub CLI.

Prerequisites

  • GitHub CLI (gh) installed and authenticated
  • Git installed
  • A frontend project (HTML, CSS, JS) ready to deploy

Deployment Workflow

1. Initialize Git Repository (if needed)

git init
git add .
git commit -m "Initial commit"

2. Create GitHub Repository

# Create public repo (required for free GitHub Pages)
gh repo create <repo-name> --public --source=. --push

3. Enable GitHub Pages

# Enable GitHub Pages from main branch root
gh api repos/{owner}/{repo}/pages -X POST -f build_type=legacy -f source='{"branch":"main","path":"/"}'

Or for docs folder:

gh api repos/{owner}/{repo}/pages -X POST -f build_type=legacy -f source='{"branch":"main","path":"/docs"}'

4. Check Deployment Status

# Get pages info
gh api repos/{owner}/{repo}/pages

# View deployment status
gh api repos/{owner}/{repo}/pages/builds/latest

5. Set Homepage URL in Repo Settings

Always do this — sets the live URL in the GitHub repo's About panel (top-right on the repo page):

OWNER=$(gh api user --jq '.login')
PAGES_URL=$(gh api repos/$OWNER/$REPO_NAME/pages --jq '.html_url')
gh api --method PATCH repos/$OWNER/$REPO_NAME --field homepage="$PAGES_URL" --jq '.homepage'

6. Get Site URL

The site will be available at: https://<username>.github.io/<repo-name>/

Auto-deploy is active: every push to main triggers a rebuild. No GitHub Actions needed for legacy build.

Quick Deploy Script

For a complete deployment in one flow:

# Variables
REPO_NAME="my-site"

# Initialize and commit
git init
git add .
git commit -m "Initial commit"

# Create repo and push
gh repo create $REPO_NAME --public --source=. --push

# Enable pages
sleep 2
OWNER=$(gh api user --jq '.login')
gh api repos/$OWNER/$REPO_NAME/pages -X POST -f build_type=legacy -f source='{"branch":"main","path":"/"}'

# Set homepage URL in repo About panel
PAGES_URL="https://$OWNER.github.io/$REPO_NAME/"
gh api --method PATCH repos/$OWNER/$REPO_NAME --field homepage="$PAGES_URL" --jq '.homepage'

echo "✓ Site live at: $PAGES_URL"

Troubleshooting

  • Pages not enabled: Ensure repo is public or you have GitHub Pro
  • 404 error: Wait 1-2 minutes for deployment, check if index.html exists at root
  • Build failed: Check GitHub Actions tab for errors

Updating the Site

After making changes:

git add .
git commit -m "Update site"
git push

GitHub Pages will automatically rebuild.

Related skills

How it compares

Pick gh-pages-deploy for quick public static hosting on GitHub Pages; choose full CI/CD platforms when you need SSR, secrets, or multi-environment production pipelines.

FAQ

What does gh-pages-deploy use to publish sites?

gh-pages-deploy uses the GitHub CLI (gh) to deploy static or interactive HTML, CSS, and JS content to GitHub Pages, configuring branches, build output, and Actions workflows.

What projects fit gh-pages-deploy?

gh-pages-deploy covers demos, prototypes, visualizations, landing pages, portfolios, documentation, interactive tools, and games—any browser project that needs a public URL, not only formal websites.

What version is gh-pages-deploy?

gh-pages-deploy is version 1.0.0 in skill metadata by author aviz85, tagged for deployment, GitHub, hosting, and frontend publishing workflows.

DevOps & CI/CDdeployinfra

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.