From 994f7b71ddc0404788c84e96537fee0300ab73b8 Mon Sep 17 00:00:00 2001 From: wood911010 Date: Sat, 22 Nov 2025 02:18:46 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E6=B5=81=E7=A8=8B=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E5=92=8C?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=9E=84=E5=BB=BA=E4=BA=A7=E7=89=A9=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=20base=20=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_frontend.git.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_frontend.git.yml b/.github/workflows/deploy_frontend.git.yml index 26cdac5..c9ca88f 100644 --- a/.github/workflows/deploy_frontend.git.yml +++ b/.github/workflows/deploy_frontend.git.yml @@ -50,8 +50,9 @@ jobs: - name: Type check and build run: | cd frontend - # 设置构建输出目录为 production + # 设置构建环境变量,确保与本地构建一致 export VITE_OUTDIR=production + export VITE_ADDRESS_BASE_URL=/production/ # 并行执行类型检查和构建以节省时间 npm run type-check & npm run build:prod & @@ -59,6 +60,9 @@ jobs: # 检查构建结果 echo "Build completed, checking production directory:" ls -la production/ + # 验证构建产物中的 base 路径 + echo "Verifying base path in index.html:" + grep -o 'href="/production/' production/index.html | head -1 || echo "Warning: base path not found" # 准备临时部署目录 - name: Prepare temp directory