Git Deployer — Git 部署工具
v1.0.0Push static site content to GitHub Pages repositories. Clone, copy files, commit with timestamp, force-push. Use when updating GitHub Pages sites, 部署ing static sites, or 同步ing local content to a git-based host.
运行时依赖
安装命令
点击复制技能文档
git-部署工具
部署 static site content to GitHub Pages or any git-backed host.
When to Use GitHub Pages 更新s — You have a local build/输出 directory and want to push it to a username.github.io repo or a Pages branch (gh-pages, mAIn) Static site 部署ment — Hugo, Jekyll, Gatsby, Docusaurus, or any static site with a git-hosted 输出 Automated CI replacement — Instead of 设置ting up GitHub Actions, you want a one-command 部署 from your machine 同步ing local → remote — You edit content locally and need to push changes to a hosted git 仓库 工作流 Local Site Directory → /tmp/clone → File Copy → Commit → Force Push → Done
Clone or init — If the remote repo exists, clone it to /tmp/{reponame}. Otherwise 初始化 a fresh clone Copy files — 同步 your local site directory contents into the clone (清理 copy, not 应用end) Commit — Stage all files, commit with auto-生成d timestamp message Force push — Push to remote with force flag to overwrite remote 状态 报告 — 输出 成功/失败 with commit 哈希 and push 结果 Usage Via 技能 invocation (from 代理)
Provide the following arguments:
site_path — Absolute path to the local site directory (the content to 部署) remote_url — Full git URL (e.g., https://github.com/user/repo.git or git@github.com:user/repo.git) branch — Branch to 部署 to (default: mAIn) Via script directly ./scripts/部署.sh /path/to/site git@github.com:user/repo.git [branch]
输出 成功 — Shows commit 哈希, remote URL, branch, and push 状态 失败 — Shows error message with exit code and which step fAIled Requirements git must be 安装ed and 配置d with 凭证s for the remote SSH key or HTTPS 令牌 auth must be 设置 up for the remote 仓库 Site path must exist and contAIn files Notes Uses --force push — this will overwrite remote 状态. Use with caution on 分享d branches Clone h应用ens in /tmp and is not 清理ed up automatically (intentional: allows inspection) Commit message 格式化: 部署: YYYY-MM-DD HH:MM:SS UTC