Publish to GitHub Pages

Automates cross-repo publishing of dist/public to gh-pages via a sibling earlbear checkout.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/EarlBear/homebrew-tap --skill publish-to-github-pages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Publish to GitHub Pages
Source: https://github.com/EarlBear/homebrew-tap/tree/main/plugins-bundle/artifact-manager/skills/publish
Command: npx skills add https://github.com/EarlBear/homebrew-tap --skill publish-to-github-pages

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the end-to-end publishing of static site builds from a dedicated build repository to the live GitHub Pages site by coordinating a cross-repo workflow using a sibling checkout and a gh-pages worktree.

Core Features & Use Cases

  • Cross-repo publish orchestration: coordinates dist/public builds in earlbear-sites with a forced push to gh-pages in the earlbear checkout.
  • Validation and safety: ensures a clean working tree and validates build artifacts before publishing to production.
  • Simple, repeatable workflow: leverages a Makefile publish target to perform the end-to-end deployment from local to live.

Quick Start

Run the publish workflow from the earlbear-sites directory after you have completed a local build

Frequently Asked Questions about Publish to GitHub Pages

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate publishing a static site build to GitHub Pages from a separate repository?

Automating static site publishing to GitHub Pages requires coordinating a cross-repo workflow that pushes dist/public artifacts from a build repository to the gh-pages branch using a sibling checkout and a controlled worktree.

What's the best way to force-push build artifacts to gh-pages without risking my main repository?

Force-pushing build artifacts to gh-pages safely involves using a sibling repository checkout and a controlled git worktree, which isolates the deployment process and validates artifacts before updating the live GitHub Pages site.

Do I need a Makefile to deploy my static site to GitHub Pages?

A Makefile is required to execute the end-to-end deployment workflow, as the publish target leverages it to orchestrate the cross-repo build validation and the forced push to the gh-pages branch.

Why does my cross-repo GitHub Pages deployment require a clean sibling checkout?

A cross-repo GitHub Pages deployment requires a clean sibling checkout to ensure a clean working tree, which is a safety prerequisite for validating build artifacts and safely performing controlled force-pushes to production.

Can I use this workflow to publish static sites if my build pipeline is managed in a separate repository?

You can use this workflow when a separate build repository manages your pipeline, because it specifically orchestrates cross-repo publish workflows by coordinating builds with a forced push to gh-pages in the sibling checkout.