Skip to content

Deploys static frontend projects to GitHub Pages through the gh CLI, from repo creation to live URL.

CCM score
53 of 100
skills.sh installs
314
GitHub stars
52
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full publish flow: git init, repo creation with gh repo create, enabling Pages via the API, and checking build status
  • Includes a complete one-shot deploy script that creates the repo, enables Pages, and sets the homepage URL in the About panel
  • Enforces a public repository and a root-level index.html, since free Pages requires public repos and 404s otherwise
  • Designed for demos, prototypes, docs, and browser-based projects that need a public URL without a separate hosting setup

Install

$ npx -y skills add aviz85/claude-skills-library --skill gh-pages-deploy -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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):

Details

Repository
github.com/aviz85/claude-skills-library
Categories
DevOps & Cloud, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the gh-pages-deploy skill do?

It publishes static or interactive frontend content, such as HTML, CSS and JS demos, prototypes, landing pages and games, to GitHub Pages using the gh CLI. Every push to main then triggers a rebuild, so the site stays live at a public URL.

What do I need before using gh-pages-deploy?

You need the GitHub CLI (gh) installed and authenticated, Git installed, and a frontend project ready to deploy. The repository must be public for free GitHub Pages hosting.

How do I install the gh-pages-deploy skill?

Run npx -y skills add aviz85/claude-skills-library --skill gh-pages-deploy -y in your project. The agent can then create the repository, enable Pages and set the homepage URL in the repo About panel.

Where does gh-pages-deploy stand in the DevOps & Cloud category?

It sits in the DevOps & Cloud category alongside Azure skills such as azure-diagnostics, azure-prepare and azure-deploy. Unlike those, it targets simple static frontend hosting on GitHub Pages rather than Azure infrastructure.

More from aviz85/claude-skills-library

All 6

Similar to Gh Pages Deploy

More DevOps & Cloud