fix(ci): site 流水线加 npm 国内镜像(GFW)+ npm ci 重试 #9

Merged
wangjia merged 1 commits from fix/site-npm-mirror into main 2026-08-01 12:36:45 +00:00
Owner

site pipeline 在墙内 nas runner 上 npm ci/npx wrangler 直连 npmjs.org 慢挂——_env.sh 有 Go/Flutter 镜像却漏了 npm,且 site 脚本没 source _env.sh。加 NPM_CONFIG_REGISTRY=npmmirror + npm_ci_retry,3 个 site 脚本 source _env.sh。本地实跑 compile-site 构建成功。commit f0f845c。

site pipeline 在墙内 nas runner 上 npm ci/npx wrangler 直连 npmjs.org 慢挂——_env.sh 有 Go/Flutter 镜像却漏了 npm,且 site 脚本没 source _env.sh。加 NPM_CONFIG_REGISTRY=npmmirror + npm_ci_retry,3 个 site 脚本 source _env.sh。本地实跑 compile-site 构建成功。commit f0f845c。
wangjia added 1 commit 2026-08-01 12:33:12 +00:00
fix(ci): site 流水线加 npm 国内镜像(GFW)+ npm ci 重试
Deploy Site / deploy-site (push) Successful in 2m6s
Deploy Client / build-windows (push) Successful in 1m43s
Deploy Client / build-android (push) Successful in 20m37s
Deploy Client / build-macos (push) Successful in 8m19s
Deploy Client / build-ios (push) Successful in 5m29s
Deploy Client / release-deploy (push) Failing after 24m14s
f0f845c6e5
site pipeline(deploy-site.yml:Astro 官网 + Next.js 用户中心 + npx wrangler)
在墙内 nas runner 上 npm ci / npx wrangler@4 直连 registry.npmjs.org → 慢/抖断。
_env.sh 早有 Go(goproxy.cn)/Flutter(flutter-io.cn)镜像,唯独漏了 npm,且 3 个
site 脚本根本没 source _env.sh。上次「修外网发版 GFW 坑」只覆盖 android(gradle)/
windows(maven),site 这块遗漏。

- _env.sh:加 NPM_CONFIG_REGISTRY=registry.npmmirror.com(可 env 覆盖)+ npm_ci_retry
  助手(照 flutter_pub_get_retry,5 次重试)。
- compile-site.sh / compile-usercenter.sh:source _env.sh,npm ci → npm_ci_retry。
- deploy-site.sh:source _env.sh,让 npx wrangler@4 也走镜像拉包。

本地实跑 compile-site.sh:镜像生效、Astro 构建成功、dist/ 产物齐全(index.html 48K
+ 多语言目录)。shellcheck -x 全 clean。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A79VtQA1BwTuQN1ThpvYpo
wangjia merged commit f0f845c6e5 into main 2026-08-01 12:36:45 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangjia/pangolin#9