deploy
Deploy the blog to GitHub Pages. Use when user says "deploy", "部署", or wants to publish the blog.
When & Why to Use This Skill
This Claude skill automates the end-to-end deployment process for Hugo-based blogs to GitHub Pages. It enhances publishing workflows by performing critical pre-deployment checks—such as identifying draft posts, verifying SEO descriptions, and updating timestamps—before executing build and push commands via Git and Makefiles.
Use Cases
- Automated Blog Publishing: Seamlessly deploy new content to GitHub Pages by simply telling the agent to 'deploy' or 'publish'.
- Pre-Deployment Quality Control: Automatically scan for draft posts and missing metadata to ensure only polished, SEO-ready content is made public.
- Streamlined DevOps Workflow: Replace manual multi-step terminal commands (build, commit, push) with a single intelligent agent action that handles environment navigation and execution.
- Content Maintenance: Efficiently update post timestamps and verify site integrity before pushing live updates to a personal or technical blog.
| name | deploy |
|---|---|
| description | Deploy the blog to GitHub Pages. Use when user says "deploy", "部署", or wants to publish the blog. |
| allowed-tools | Bash(hugo:*), Bash(git:*), Bash(cd:*), Bash(make:*), Bash(date:*), Bash(grep:*), Read, Edit, Glob, AskUserQuestion |
Deploy Blog to GitHub Pages
Pre-deploy Checks
在執行 deploy 之前,先檢查準備發布的文章:
- 使用
grep -l "draft: false" blog/content/post/*.md找出非草稿文章 - 檢查這些文章的
description是否為空 - 如果
description為空,詢問用戶是否要補上描述 - 使用
date "+%Y-%m-%dT%H:%M:%S+08:00"取得當前時間,更新發布時間(如果用戶要求)
Steps
- 執行 Pre-deploy Checks
- 進入 blog 目錄
- 執行
make deploy(會自動 build + commit + push) - 確認部署成功
Commands
cd /home/davidleitw/Desktop/davidleitw.github.io/blog
make deploy
After deployment
告訴用戶:
- 等待 1-2 分鐘
- 訪問 https://davidleitw.github.io 確認更新