AgentSkillsCN

gh-pages

创建 GitHub 仓库,并启用 GitHub Pages 以支持静态网站托管。

SKILL.md
--- frontmatter
name: gh-pages
description: Create GitHub repo and enable GitHub Pages for static site hosting
argument-hint: [repo-name]

Setup GitHub Pages

Create a new GitHub repository and enable GitHub Pages:

  1. Create repo:
bash
gh repo create $ARGUMENTS --public --source=. --push
  1. Enable GitHub Pages:
bash
gh api repos/OWNER/$ARGUMENTS/pages -X POST -f source='{"branch":"master","path":"/"}'
  1. Get the Pages URL:
bash
gh api repos/OWNER/$ARGUMENTS/pages --jq '.html_url'

The site will be available at: https://OWNER.github.io/$ARGUMENTS/

Note: Replace OWNER with actual GitHub username.