agentleFS
AIPMAndyAIPMAndy/github-pages-deploy-skill/SKILL.md

github-pages-deploy

Skill1 starsChanged 6 months agoMITView on GitHub

Use when user wants to deploy a static website to GitHub Pages, mentions "一键部署", "GitHub Pages", or needs to publish HTML/web content to a public URL. Triggers on requests like "部署网站", "发布到GitHub", "做个网页并上线".

  • Installs packages
  • Commits and pushes

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. Rafaelrr5/agent-cortex★ 1same name
    2. SUDARSHANCHAUDHARI/PrivacyPilot★ 1same name
    3. tomekdot/hermes-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use Tailwind CSS CDN. Always responsive.

    line 104

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Pages One-Click Deployment

Zero-config deployment of static websites to GitHub Pages with full automation.

Core Principle

Detect → Install → Configure → Deploy → Verify. Never ask users for information you can detect automatically.

When to Use

  • "部署一个网站到GitHub Pages"
  • "一键部署XX网页"
  • "帮我做个网站并发布"
  • Any request combining web content creation + public hosting

Do NOT use for: Backend apps, private repos, or dynamic web apps requiring servers.

Red Flags - STOP Asking, START Detecting

ThoughtWhat to Do Instead
"我需要先确认..."Run detection commands yourself
"你有以下选择"Pick the standard approach automatically
"请告诉我..."Run which, git config, gh auth status
"需要我帮你执行哪个方案?"Execute the complete workflow
"由于XX问题..."Check error, retry 3x, then fallback

All of these mean: You're being too cautious. Automate more.

Workflow

digraph deploy_flow {
    rankdir=TB;
    node [shape=box];
    
    start [label="User Request", shape=doublecircle];
    detect [label="1. Detect\n(Git, gh, auth)"];
    install [label="2. Auto-Install"];
    auth [label="3. Setup Auth"];
    repo [label="4. Create Repo"];
    generate [label="5. Generate HTML"];
    deploy [label="6. Push & Enable"];
    verify [label="7. Verify URL"];
    done [label="Return Live URL", shape=doublecircle];
    
    start -> detect -> install -> auth -> repo -> generate -> deploy -> verify -> done;
}

Implementation

1. Detect Environment (Silent)

git --version 2>/dev/null || NEED_GIT=1
gh --version 2>/dev/null || NEED_GH=1
gh auth status 2>/dev/null || NEED_AUTH=1
GH_USER=$(gh api user --jq .login 2>/dev/null)

Never ask user for this. Detect it yourself.

2. Auto-Install Tools

# macOS: brew install git gh
# Linux: apt-get install git gh
# Windows: winget install Git.Git GitHub.cli

Do NOT ask "你装了Git吗?" - just install it.

3. Setup Authentication

gh auth login --web --git-protocol https

Use browser OAuth, NOT SSH keys. Users don't understand SSH.

4. Create Repository

REPO_NAME="${GH_USER}.github.io"

# Handle conflicts automatically
if gh repo view "$GH_USER/$REPO_NAME" &>/dev/null; then
  REPO_NAME="${GH_USER}-site-$(date +%s)"
fi

gh repo create "$REPO_NAME" --public --clone

Don't ask "仓库已存在,怎么办?" - auto-create project repo.

5. Generate HTML

Use Tailwind CSS CDN. Always responsive. See scripts.sh for template.

6. Deploy with Retry

git add . && git commit -m "Initial deployment"

# Retry 3x if push fails
for i in {1..3}; do
  git push -u origin main && break || sleep 2
done

# Enable Pages for project repos
gh api -X POST "repos/$GH_USER/$REPO_NAME/pages" \
  -f source[branch]=main -f source[path]=/

7. Verify Deployment

# Poll until HTTP 200 (max 3 min)
for i in {1..36}; do
  curl -s -o /dev/null -w "%{http_code}" "$URL" | grep -q "200" && break
  sleep 5
done

Do NOT return URL without verifying it's live.

Common Mistakes

MistakeFix
Asking "你装了Git吗?"Run git --version
Giving user 3 optionsChoose username.github.io automatically
Stopping at push failureRetry 3x with backoff
Returning URL immediatelyPoll until HTTP 200
Using SSH authenticationUse gh auth login --web

Rationalization Table

ExcuseReality
"需要确认用户的GitHub用户名"Run gh api user --jq .login
"不确定用户想要哪种部署方式"Use username.github.io (standard)
"推送失败了,让用户检查网络"Retry 3 times, diagnose error
"用户可能没装Git"Detect and auto-install
"SSH配置太复杂"Use HTTPS + gh auth login --web

Success Criteria

Deployment is complete when:

  • ✅ User receives working HTTPS URL
  • ✅ URL returns HTTP 200 (verified by curl)
  • ✅ Content matches user's request
  • ✅ Responsive design works on mobile
  • ✅ User did NOT manually run commands
  • ✅ User did NOT answer technical questions

If any failed, deployment is incomplete.

Supporting Files

  • scripts.sh - Complete automation scripts and HTML template

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.