ci(deploy): 改为 GitHub Webhook 触发部署

This commit is contained in:
admin committed 2026-10-20 14:23:31 +08:00
1 parent 69bfe3ce0e
commit 469630e7da
11 files changed
+267 -78

No files matched your search

+12 -1
View File
@@ -73,7 +73,18 @@ sudo journalctl -u weread.service -n 100 --no-pager
### 检查部署分支
自动部署只允许 `master`。如果 Actions 没有启动,先确认提交是否已经合并并推送到 `master`;仅推送 `dev` 不会部署。服务器部署日志中的拉取目标也必须是 `origin/master`,出现其他分支时应停止发布并检查工作流与 `deploy.sh`。
自动部署只允许 `master`。先检查 GitHub Webhook 的 Recent Deliveries、服务器 `weread-webhook.service` 日志和 Nginx HTTPS 转发;仅推送 `dev` 不会部署。服务器部署日志中的拉取目标必须是 `origin/master`,出现其他分支时应停止发布并检查 Webhook 环境变量与 `deploy.sh`。
Webhook 排查命令:
```bash
sudo systemctl status weread-webhook.service --no-pager
sudo journalctl -u weread-webhook.service -n 100 --no-pager
sudo nginx -t
curl -fsS https://laohang.space/health
```
GitHub 显示签名错误时,确认 Webhook Secret 与 `/etc/weread-webhook.env` 完全一致;显示 202 但没有部署时,确认仓库全名、`refs/heads/master` 和部署锁状态。不要通过请求体传入 Shell 命令。
## 2026-09-14:接口调整后页面请求失败