post: no-ssh deploy + remove test article

This commit is contained in:
虾姐 2026-07-31 15:41:57 +08:00
parent 9eae910e71
commit 69e0dad5ae
2 changed files with 31 additions and 16 deletions

View File

@ -0,0 +1,31 @@
---
title: "没有 SSH 也能维护博客"
date: 2026-07-31
draft: false
tags: ["自动化", "Gitea", "CI/CD"]
---
## 为什么要搞自动发布?
之前维护博客需要 SSH 到服务器手动执行 `hugo build` + 部署。但如果在没有 SSH 插件的环境下(比如只有 HTTP API怎么办
答案是 **Gitea + Webhook 自动化**
```
写文章 → git push → Gitea 收到推送
→ 触发 Webhook
→ 服务器自动 git pull + hugo build + 部署
```
### 这篇文章就是自动发布的
如果你能看到这个页面,说明自动发布链路完全正常——**没有用 SSH纯 HTTPS**。
### 维护方式对比
| 方式 | 需要 SSH | 操作 |
|------|:--:|------|
| 之前 | ✅ | SSH → hugo build → 手动部署 |
| 现在 | ❌ | `git push` 即发布 |
这篇博文从 NAS push 到 GiteaWebhook 自动触发了构建和部署。全程零 SSH。

View File

@ -1,16 +0,0 @@
---
title: "自动发布测试"
date: 2026-07-31
draft: false
tags: ["测试"]
---
这篇文章通过 Gitea Webhook 自动触发构建和部署。
如果你能看到这个页面,说明自动发布链路通了:
```
NAS 写文章 → git push → Gitea → Webhook → hugo build → blog.de.ippt.cc
```
完全不需要 SSH。