博客部署备忘
日常更新流程
1 2 3 4 5 6 7 8 9 10 11
| cd D:\my-blog\my-blog
hexo server
git add . git commit -m "描述你的改动" git push origin main
|
推送后无需任何操作 —— GitHub Actions 会自动:
- 构建 Hexo 并部署到 GitHub Pages(
gh-pages 分支)→ adaydream.cn
- rsync 上传到 阿里云服务器
/var/www/my-site/(47.116.103.176)
HTTPS / SSL
- Let’s Encrypt 证书,通过 certbot + nginx 插件申请
- 自动续签由 certbot timer 管理,无需手动操作
- 证书路径:
/etc/letsencrypt/live/adaydream.cn/
重要提醒
- 不要再使用
hexo deploy —— 已在 _config.yml 中注释掉,部署完全由 GitHub Actions 接管
- 自定义域名
adaydream.cn 靠 source/CNAME 文件保持,不要删除它
- GitHub Actions 工作流 在
.github/workflows/deploy.yml,约 2-3 分钟完成部署
文件结构速查
| 文件/目录 |
用途 |
source/_posts/ |
博客文章(Markdown) |
source/CNAME |
自定义域名持久化 |
_config.yml |
Hexo 主配置 |
themes/arknights/ |
明日方舟主题 |
.github/workflows/deploy.yml |
自动部署工作流 |
.claude/skills/arknights-design/ |
设计系统 Skill 模板 |
文章 Frontmatter 示例
1 2 3 4 5 6 7 8
| --- title: 文章标题 date: 2026-05-23 18:00:00 tags: - 标签1 - 标签2 description: 文章摘要描述 ---
|
查看部署状态
访问 https://github.com/Blooming-cherry/blooming-cherry.github.io/actions 查看 Actions 运行日志。
风格系统
- 首页和归档页:固定使用主线(炎国)风格
- 文章页:根据 slug 的 MD5 哈希随机分配 14 种故事线风格之一
明日方舟美术风格分析 文章:固定主线风格(在 themes/arknights/_config.yml 的 fixed_main_style 中配置)