Agent Skill: hexo-deploy
hexo-deploy
Introduction
介绍
This is an Agent Skill for automating Hexo blog site deployment, designed by WaterCoFire specifically for the development workflow of WaterCoFire Playground. It condenses the entire Hexo blog publishing process into a single conversational command, handling all deployment tasks from content generation to code submission.
这是一个用于 Hexo 博客站点自动化部署的 Agent Skill,是 WaterCoFire 专为 WaterCoFire Playground 网站的开发工作流而设计的。它能将 Hexo 博客的完整发布流程压缩为一次对话指令,负责处理从内容生成到代码提交的全部部署工作。
If you also maintain a Hexo blog site, feel free to use it directly!
如果你也在维护一个 Hexo 博客网站,欢迎直接取用!
Workflow Overview
工作流概览
This Skill splits deployment into two sequential phases:
该 Skill 将部署拆分为两个独立阶段,按顺序执行:
1 | Phase 1 — Hexo Build & Publish |
If any step fails, the Agent should immediately stop and report the error without proceeding to execute subsequent commands.
任意步骤失败时,Agent 应会立即停止并报告错误,不会继续执行后续命令。
How to Use?
如何使用?
Simply tell the Agent you’re using that you want to deploy and provide the commit message:
直接告诉您所用的 Agent 您要部署,并提供 commit 消息即可:
1 | Deploy for me, commit message is "Added About page" |
The Agent will automatically execute all commands sequentially.
如果您以中文提供了 commit 消息,Agent 应会自动将该消息润色为英文,然后依次执行所有命令。
You can also the Agent automatically generate the commit message based on the diff:
也可以让 Agent 根据 diff 自动生成 commit 消息:
1 | Deploy for me, you generate the commit message |
Partial Execution
部分执行
| Command / 指令 | Behavior / 行为 |
|---|---|
Deploy only or Hexo only 只部署 或 只 hexo |
仅执行 Phase 1(Hexo 构建 & 发布),跳过 Phase 2 |
Commit only or Git only 只提交 或 只 git |
仅执行 Phase 2(Git 提交),跳过 Phase 1 |
Customization Notes
定制说明
This Skill is designed under the assumption that: Hexo blog source code is maintained in a separate Git repository (i.e., distinct from the hosting repository pushed by hexo d). This is the repository structure of WaterCoFire Playground.
该 Skill 的设计前提是:Hexo 博客的源码本身也维护在一个独立的 Git 仓库中(即与 hexo d 所推送的 hosting 仓库相分离)。这是 WaterCoFire Playground 的仓库结构。
If your setup differs, please adjust accordingly before use:
如果你的情况与此不同,在使用前请按需调整:
Single Git repository (source code = hosting repository)
只有一个 Git 仓库(源码即 hosting 仓库)
Remove the Git phase in Phase 2, or integrate it into the hexo d logic.
删除 Phase 2 的 Git 阶段,或将其合并进 hexo d 的逻辑中。
No need for hexo clean
不需要 hexo clean
Remove this command from Phase 1.
从 Phase 1 中移除该命令。
Main branch is not main
主分支不是 main
Replace main in git push origin main with your branch name.
将 git push origin main 中的 main 替换为你的分支名。
Prerequisites
适用前提
- Hexo CLI is installed and configured (
hexocommand is available)
已安装并配置好 Hexo CLI(hexo命令可用) - Deployment target for
hexo dis correctly configured in_config.ymlhexo d的部署目标已在_config.yml中正确配置 - Git is initialized, remote repository
originis set up
Git 已初始化,远程仓库origin已设置
File Contents
文件内容
Metadata
元数据
1 | --- |
Full File
完整文件
Click the button below to download.
请点击下方按钮下载。
本帖采用 CC BY-NC-SA 4.0 许可协议发布。转载请注明来源。
This post is licensed under CC BY-NC-SA 4.0. Credit the source when reposting.
