返回顶部
g

git-deployerGit部署工具

Push static site content to GitHub Pages repositories. Clone, copy files, commit with timestamp, force-push. Use when updating GitHub Pages sites, deploying static sites, or syncing local content to a git-based host.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
101
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

git-deployer

git-deployer

将静态站点内容部署到 GitHub Pages 或任何基于 Git 的主机。

使用场景

  • - GitHub Pages 更新 — 你有一个本地构建/输出目录,希望将其推送到 username.github.io 仓库或 Pages 分支(gh-pages、main)
  • 静态站点部署 — Hugo、Jekyll、Gatsby、Docusaurus 或任何使用 Git 托管输出的静态站点
  • 自动化 CI 替代方案 — 无需配置 GitHub Actions,只需一条命令即可从本地部署
  • 本地 → 远程同步 — 你在本地编辑内容,需要将更改推送到托管的 Git 仓库

工作流程

本地站点目录 → /tmp/克隆 → 文件复制 → 提交 → 强制推送 → 完成

  1. 1. 克隆或初始化 — 如果远程仓库存在,则克隆到 /tmp/{仓库名}。否则初始化一个新的克隆
  2. 复制文件 — 将本地站点目录内容同步到克隆中(完全覆盖,而非追加)
  3. 提交 — 暂存所有文件,使用自动生成的时间戳消息提交
  4. 强制推送 — 使用强制标志推送到远程,覆盖远程状态
  5. 报告 — 输出成功/失败信息,包含提交哈希和推送结果

使用方法

通过技能调用(从代理)

提供以下参数:

  • - sitepath — 本地站点目录的绝对路径(要部署的内容)
  • remoteurl — 完整的 Git URL(例如 https://github.com/user/repo.git 或 git@github.com:user/repo.git)
  • branch — 要部署的分支(默认:main)

直接通过脚本

bash
./scripts/deploy.sh /path/to/site git@github.com:user/repo.git [branch]

输出

  • - 成功 — 显示提交哈希、远程 URL、分支和推送状态
  • 失败 — 显示错误信息,包含退出代码和失败步骤

要求

  • - 必须安装 git 并配置远程仓库的凭据
  • 必须为远程仓库设置 SSH 密钥或 HTTPS 令牌认证
  • 站点路径必须存在且包含文件

注意事项

  • - 使用 --force 推送 — 这将覆盖远程状态。在共享分支上请谨慎使用
  • 克隆操作在 /tmp 中执行,不会自动清理(有意为之:允许检查)
  • 提交消息格式:Deploy: YYYY-MM-DD HH:MM:SS UTC

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 git-deployer-1776019438 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 git-deployer-1776019438 技能

通过命令行安装

skillhub install git-deployer-1776019438

下载

⬇ 下载 git-deployer v1.0.0(免费)

文件大小: 2.82 KB | 发布时间: 2026-4-13 10:26

v1.0.0 最新 2026-4-13 10:26
Initial release of git-deployer.

- Deploy static site content to any GitHub Pages or git-backed host via command or script.
- Clones or initializes the remote repository to `/tmp`, force-pushes clean local output.
- Commits with timestamped message and reports commit hash and push status.
- Supports targeting any branch; configurable via arguments.
- Requires git and configured credentials; uses force push (overwrites remote).
- Designed for automated, one-command site deployments or syncing local changes.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部