
This automates GitHub Pages deployment through the gh CLI, handling the whole flow from repo creation to getting your site live. You get a one-shot script that initializes git, creates a public repo, enables Pages, and sets the homepage URL in one go. It's honestly the straightforward approach if you're already using gh CLI and just want to push static content without wrestling with Actions workflows or manual settings. Every push to main auto-deploys, which is clean for quick demos and prototypes. The skill includes the actual API calls to enable Pages programmatically, which saves you from clicking through the web UI every time.
$ npx -y skills add aviz85/claude-skills-library --skill gh-pages-deploy --agent claude-codeInstalls into .claude/skills of the current project.
Deploy static frontend websites to GitHub Pages using the GitHub CLI.
gh) installed and authenticatedgit init
git add .
git commit -m "Initial commit"
# Create public repo (required for free GitHub Pages)
gh repo create <repo-name> --public --source=. --push
# 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"}'
# Get pages info
gh api repos/{owner}/{repo}/pages
# View deployment status
gh api repos/{owner}/{repo}/pages/builds/latest
Always do this — sets the live URL in the GitHub repo's About panel (top-right on the repo page):
Sponsors