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.

If you also maintain a Hexo blog site, feel free to use it directly!

Workflow Overview

This Skill splits deployment into two sequential phases:

1
2
3
4
5
6
7
Phase 1 — Hexo Build & Publish
hexo clean → hexo g → hexo d
└─ Push the public/ directory to your hosting repository (e.g., GitHub Pages)

Phase 2 — Source Code Commit
git add . → git commit → git push origin main
└─ Save source files to your code repository

If any step fails, the Agent should immediately stop and report the error without proceeding to execute subsequent commands.

How to Use?

Simply tell the Agent you’re using that you want to deploy and provide the commit message:

1
Deploy for me, commit message is "Added About page"

The Agent will automatically execute all commands sequentially.

You can also the Agent automatically generate the commit message based on the diff:

1
Deploy for me, you generate the commit message

Partial Execution

Command Behavior
Deploy only or Hexo only
Executes Phase 1 (Hexo Build & Publish) only, skips Phase 2
Commit only or Git only
Executes Phase 2 (Git Commit) only, skips Phase 1/center>

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.

If your setup differs, please adjust accordingly before use:

Single Git repository (source code = hosting repository)

Remove the Git phase in Phase 2, or integrate it into the hexo d logic.

No need for hexo clean

Remove this command from Phase 1.

Main branch is not main

Replace main in git push origin main with your branch name.

Prerequisites

  • Hexo CLI is installed and configured (hexo command is available)
  • Deployment target for hexo d is correctly configured in _config.yml
  • Git is initialized, remote repository origin is set up

File Contents

Metadata

1
2
3
4
---
name: hexo-deploy
description: "Deploy this website and commit source files to Git. This skill handles the full two-step workflow: build & deploy public/ via hexo, then commit source files to the source repository."
---

Full File

Click the button below to download.

📥 Download