Compare commits

...

2 Commits

Author SHA1 Message Date
wangjia 5ceef18ace Merge pull request 'fix(ci): deploy-server/site Checkout 加 fetch-depth:1(治间歇性失败)' (#19) from fix/ci-checkout-shallow into main
Deploy Server / deploy-server (push) Successful in 3m37s
Reviewed-on: #19
2026-09-13 02:18:09 +00:00
wangjia a399b3d701 fix(ci): deploy-server/site 的 Checkout 加 fetch-depth:1(治间歇性 Checkout 失败)
根因(runner 日志实证):actions/checkout 从 GITHUB_SERVER_URL=http://git.51yanmei.com
克隆——该域名解析到 ali 公网、发夹弯绕回 NAS,慢且间歇 reset;而 runner↔gitea 的
API 通信走 LAN 192.168.3.200:3000 是稳的。deploy-server/site 用 full clone(全历史
几十 MB)走那条抖动链路必挂在 Checkout;deploy-client 早已加 fetch-depth:1 故其发版能过。

给 deploy-server/site 的 Checkout 补上同样的 fetch-depth:1,数据量降到几 MB,
大幅提升成功率(与 deploy-client 一致)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-12 23:13:08 +08:00
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -16,6 +16,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# 浅克隆:actions/checkout 从 GITHUB_SERVER_URL=http://git.51yanmei.com 克隆
# (解析到 ali 公网→发夹弯绕回 NAS,慢且间歇 reset);全历史几十 MB 走这条链路
# 必挂,depth=1 降到几 MB 大幅提升 Checkout 成功率。与 deploy-client 一致。
fetch-depth: 1
# runner 镜像(catthehacker ubuntu:act-latest,label ubuntu-latest)自带 node
# 但**不带 go** → 直接 `go build` 会 `go: command not found`(exit 127)。
+5
View File
@@ -16,6 +16,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# 浅克隆:actions/checkout 从 GITHUB_SERVER_URL=http://git.51yanmei.com 克隆
# (解析到 ali 公网→发夹弯绕回 NAS,慢且间歇 reset);全历史几十 MB 走这条链路
# 必挂,depth=1 降到几 MB 大幅提升 Checkout 成功率。与 deploy-client 一致。
fetch-depth: 1
# runner 镜像 catthehacker/ubuntu:act-latest 自带 node/npx,直接跑;
# 不用嵌套 docker run(job 容器内的 $PWD 在宿主上不存在,DinD 挂载会失败)。