Skip to content

fix(ci): 部署 job 改用 artifact 传配置,不再 checkout - #3

Merged
NEDONION merged 1 commit into
mainfrom
fix/deploy-checkout
Aug 11, 2026
Merged

NEDONION merged 1 commit into
mainfrom
fix/deploy-checkout

Conversation

@NEDONION

Copy link
Copy Markdown
Owner

首次自动部署失败:镜像构建推送都成功,卡在部署这一步的 actions/checkout。

fatal: unable to access 'https://github.com/NEDONION/rag-agent-platform/':
  Failed to connect to github.com port 443 after 130394 ms

原因:actions/checkout 会在 runner 所在机器上执行 git clone github.com,而服务器到 github.com:443 正是那个 25 KB/s 的连接,三次重试全超时。

关键观察:runner 与 GitHub 通信完全正常(它成功领到了任务)—— 那条链路走 *.actions.githubusercontent.com,是通的。不通的只有 github.com:443 这一个入口。

修复:部署只需要两个配置文件,不需要整个仓库。新增 config job 在云端打包成 artifact,deploy job 用 download-artifact 取用,走的正是那条已证明可用的链路。

同时按要求给文档全部主要章节加了「一句话人话」导读(10 处),并补入 3.10 与第 12 条经验教训。

🤖 Generated with Claude Code

首次自动部署失败:两个镜像构建推送成功,但部署这一步挂在 actions/checkout。

  fatal: unable to access 'https://github.com/NEDONION/rag-agent-platform/':
    Failed to connect to github.com port 443 after 130394 ms
  The process '/usr/bin/git' failed with exit code 128

actions/checkout 会在 runner 所在机器上执行 git clone github.com,而服务器到
github.com:443 的连接正是 runner tarball 那个 25 KB/s 的问题,三次重试全部超时。

关键观察:runner 与 GitHub 的通信完全正常(它成功领到了任务),那条链路走的是
*.actions.githubusercontent.com;不通的只有 github.com:443 这一个入口。

部署这一步其实只需要 docker-compose.yml 和 deploy/nginx.conf,不需要整个仓库。
新增 config job 在云端打包成 artifact,deploy job 用 download-artifact 取用——
走的正是那条已被证明可用的链路。

文档同步更新:
- 新增 3.10 记录本问题
- 新增第 12 条经验:受限网络里把需要外网的步骤留在云端 job,只把必须本机执行的
  放到自托管 job,中间用 artifact 传递。actions/checkout 是最容易忽略的一个——
  它看起来只是"取代码",实际会在执行它的那台机器上发起网络请求
- 按要求为全部主要章节添加「一句话人话」导读(共 10 处),用大白话概括每节内容,
  技术细节保留在下方不变

验证:workflow YAML 可解析,三个 job 依赖关系正确,deploy job 已无 checkout,
仍不含 pull_request 触发器,全部 run 步骤通过 bash -n。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@NEDONION
NEDONION merged commit 4baf17d into main Aug 11, 2026
3 checks passed
@NEDONION
NEDONION deleted the fix/deploy-checkout branch August 11, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant