fix(deploy): build staging web artifact
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 36s
Deploy / Deploy Staging (push) Failing after 2009h17m9s
Deploy / Deploy Production (push) Failing after 2009h17m43s
Deploy / Build Production Runtime Images (push) Failing after 2009h17m45s
Deploy / Production Browser E2E (push) Failing after 2009h48m58s

This commit is contained in:
Xiaoxia AI
2026-06-24 22:13:03 +08:00
parent cdad6fd641
commit 3bffa3cb02
2 changed files with 23 additions and 1 deletions
+15 -1
View File
@@ -45,12 +45,26 @@ jobs:
set -eu
cp /var/lib/xiaoxia-saas-staging/.env /var/lib/xiaoxia-saas-staging/repo/.env
- name: Build staging web artifact
shell: sh
run: |
set -eu
cd /var/lib/xiaoxia-saas-staging/repo
rm -rf apps/web/dist
docker run --rm \
--pull=never \
-v "$PWD:/workspace" \
-w /workspace/apps/web \
docker.m.daocloud.io/library/node:20 \
sh -lc 'npm ci && npm run build'
test -f apps/web/dist/index.html
- name: Deploy staging stack
shell: sh
run: |
set -eu
chmod +x /var/lib/xiaoxia-saas-staging/repo/infra/docker/deploy-staging.sh
HOST_PREFIX= WEB_PORT=3001 /var/lib/xiaoxia-saas-staging/repo/infra/docker/deploy-staging.sh
HOST_PREFIX= WEB_PORT=3001 BUILD_WEB=1 WEB_DOCKERFILE=infra/docker/web-artifact.Dockerfile /var/lib/xiaoxia-saas-staging/repo/infra/docker/deploy-staging.sh
- name: Verify staging health
shell: sh
+8
View File
@@ -166,3 +166,11 @@ V21 结构:三张套餐 feature 卡片,免费版/专业版/企业版,推
- Staging Web 构建在拉取 docker.m.daocloud.io/library/node:20 时卡住,属于外网基础镜像依赖问题。
- deploy-staging.sh 已改为默认复用现有 Web 镜像;如需重建 Web,显式设置 BUILD_WEB=1。
## 2026-06-24 Staging Web Artifact 构建升级
- Deploy workflow 已升级为先使用本地缓存的 docker.m.daocloud.io/library/node:20 执行
pm ci && npm run build 生成 pps/web/dist。
- Staging deploy 显式设置 BUILD_WEB=1 WEB_DOCKERFILE=infra/docker/web-artifact.Dockerfile,使用当前 commit 的 dist 构建 nginx artifact 镜像。
- docker run 使用 --pull=never,避免再次因外网基础镜像拉取阻塞。