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

+6 -6
View File
@@ -8,16 +8,16 @@ if ! grep -q '^ - master$' "$WORKFLOW"; then
echo "部署工作流尚未监听 master"
exit 1
fi
if grep -q '^ - dev$' "$WORKFLOW"; then
echo "部署工作流仍监听 dev"
if ! grep -q 'deploy_webhook.py' "$ROOT_DIR/deploy/weread-webhook.service"; then
echo "Webhook systemd 服务未配置"
exit 1
fi
if ! grep -q '^ group: deploy-master$' "$WORKFLOW"; then
echo "部署并发组尚未切换到 master"
if ! grep -q 'DEFAULT_BRANCH = "master"' "$ROOT_DIR/deploy_webhook.py"; then
echo "Webhook 未固定 master 分支"
exit 1
fi
if ! grep -q '^ DEPLOY_BRANCH: master$' "$WORKFLOW"; then
echo "手动部署分支尚未固定为 master"
if grep -q 'SERVER_SSH_KEY\|ssh -i' "$WORKFLOW"; then
echo "验证工作流仍包含服务器 SSH 部署"
exit 1
fi