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}...`);