From 699ed2e931bf4d0b90db6a0cea29d4e8578fd712 Mon Sep 17 00:00:00 2001 From: Xiaoxia AI Date: Mon, 22 Jun 2026 18:55:42 +0800 Subject: [PATCH] ci(release): run production deploy with host paths --- .gitea/workflows/deploy.yml | 4 ++-- tests/unit/test_release_scripts.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 71761ae4e..88e7ac167 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -118,7 +118,7 @@ jobs: run: | set -eu mkdir -p dist/release-artifacts - tar --exclude=.git --exclude=apps/web/node_modules \ + tar --exclude=.git --exclude=apps/web/node_modules --exclude=dist \ -czf "dist/release-artifacts/xiaoxia-release-${GITHUB_REF_NAME}.tar.gz" . - name: Upload runtime image and release artifacts @@ -186,7 +186,7 @@ jobs: test -f /var/lib/xiaoxia-saas-production/repo/apps/web/dist/index.html test -f /var/lib/xiaoxia-saas-production/.env cp /var/lib/xiaoxia-saas-production/.env /var/lib/xiaoxia-saas-production/repo/.env - sh /var/lib/xiaoxia-saas-production/repo/infra/docker/deploy-production.sh + HOST_PREFIX= sh /var/lib/xiaoxia-saas-production/repo/infra/docker/deploy-production.sh i=0 while [ "$i" -lt 30 ]; do if wget -qO- http://127.0.0.1:8001/health; then diff --git a/tests/unit/test_release_scripts.py b/tests/unit/test_release_scripts.py index 3d9e84d70..6126dc2ed 100644 --- a/tests/unit/test_release_scripts.py +++ b/tests/unit/test_release_scripts.py @@ -166,6 +166,7 @@ def test_gitea_production_deploy_requires_runtime_builder_job(): assert "docker.m.daocloud.io/library/node:20" in build_section assert "npm ci && npm run build" in build_section assert "dist/release-artifacts/xiaoxia-release-${GITHUB_REF_NAME}.tar.gz" in build_section + assert "--exclude=dist" in build_section assert "PRODUCTION_SSH_HOST" in build_section assert "PRODUCTION_SSH_USER" in build_section assert "PRODUCTION_SSH_KEY" in build_section @@ -178,7 +179,7 @@ def test_gitea_production_deploy_requires_runtime_builder_job(): assert "release_tar=\"/var/lib/xiaoxia-saas-production/release-${RELEASE_VERSION}.tar.gz\"" in production_section assert "runtime-images-${RELEASE_VERSION}.tar" in production_section assert "apps/web/dist/index.html" in production_section - assert "sh /var/lib/xiaoxia-saas-production/repo/infra/docker/deploy-production.sh" in production_section + assert "HOST_PREFIX= sh /var/lib/xiaoxia-saas-production/repo/infra/docker/deploy-production.sh" in production_section def test_build_host_runbook_requires_off_production_runtime_builds():