'再次修改脚本'

This commit is contained in:
2026-04-07 21:51:19 +08:00
parent b97545dc4b
commit 2789cc5f04
2 changed files with 4 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ jobs:
shell: cmd # 指定使用 Windows 命令行 shell: cmd # 指定使用 Windows 命令行
run: | run: |
pnpm install pnpm install
pnpm run dpl node deploy.js
env: env:
# 将 Gitea 的 Secrets 映射给脚本使用的环境变量 # 将 Gitea 的 Secrets 映射给脚本使用的环境变量
SENTRY_URL: ${{ secrets.GLITCHTIP_URL }} SENTRY_URL: ${{ secrets.GLITCHTIP_URL }}

View File

@@ -142,8 +142,9 @@ async function performFullDeploy() {
log.error(`SourceMap 清理失败: ${_e.message}`); log.error(`SourceMap 清理失败: ${_e.message}`);
} }
// D. 归档到本地 Prod项目 // 5. 归档到本地 Prod项目
try { try {
log.info('正在尝试归档到本地 Prod目录...');
const targetDir = path.join(PROD_RELEASES, version); const targetDir = path.join(PROD_RELEASES, version);
if (fs.existsSync(targetDir)) if (fs.existsSync(targetDir))
fs.rmSync(targetDir, { recursive: true, force: true }); fs.rmSync(targetDir, { recursive: true, force: true });
@@ -157,7 +158,7 @@ async function performFullDeploy() {
process.exit(1); process.exit(1);
} }
// 5. 远程部署 // 6. 远程部署
if (CONFIG.deployRemote) { if (CONFIG.deployRemote) {
try { try {
log.info(`准备向远程服务器部署: ${CONFIG.remote.host}...`); log.info(`准备向远程服务器部署: ${CONFIG.remote.host}...`);