From 2789cc5f04a99254625c3cce4fc727c8bdb4f9e7 Mon Sep 17 00:00:00 2001 From: Jhonton Chen <504071088@qq.com> Date: Tue, 7 Apr 2026 21:51:19 +0800 Subject: [PATCH] =?UTF-8?q?'=E5=86=8D=E6=AC=A1=E4=BF=AE=E6=94=B9=E8=84=9A?= =?UTF-8?q?=E6=9C=AC'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- deploy.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7833d79..1e39444 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: shell: cmd # 指定使用 Windows 命令行 run: | pnpm install - pnpm run dpl + node deploy.js env: # 将 Gitea 的 Secrets 映射给脚本使用的环境变量 SENTRY_URL: ${{ secrets.GLITCHTIP_URL }} diff --git a/deploy.js b/deploy.js index 3860138..3574b94 100644 --- a/deploy.js +++ b/deploy.js @@ -142,8 +142,9 @@ async function performFullDeploy() { log.error(`SourceMap 清理失败: ${_e.message}`); } - // D. 归档到本地 Prod项目 + // 5. 归档到本地 Prod项目 try { + log.info('正在尝试归档到本地 Prod目录...'); const targetDir = path.join(PROD_RELEASES, version); if (fs.existsSync(targetDir)) fs.rmSync(targetDir, { recursive: true, force: true }); @@ -157,7 +158,7 @@ async function performFullDeploy() { process.exit(1); } - // 5. 远程部署 + // 6. 远程部署 if (CONFIG.deployRemote) { try { log.info(`准备向远程服务器部署: ${CONFIG.remote.host}...`);