refactor(deploy): 统一发布脚本为单一入口 scripts/deploy.sh

- 新增 scripts/deploy.sh,支持 build/deploy/rollback/status 子命令
- 删除 deploy.sh、deploy-dist.sh、scripts/deploy-static.sh、scripts/deployment/deploy-production.sh
- Jenkinsfile 部署/回滚改为调用统一脚本,移除内联部署逻辑与 STATIC_DIR
- 同步 README、DEPLOYMENT、docs、CLAUDE.md、setup-cicd 与 package.json 脚本
This commit is contained in:
2026-08-17 18:40:51 +08:00
parent 315d664b9c
commit af57504e8e
19 changed files with 511 additions and 657 deletions
+7 -7
View File
@@ -18,16 +18,16 @@
│ novalon-website │
│ - 构建命令: npm run build:clean │
│ - 输出目录: dist/ │
│ - 部署命令: ./deploy-dist.sh
│ - 部署命令: ./scripts/deploy.sh deploy
└──────────────────────┬──────────────────────────────┘
│ rsync + SSH (root@139.155.109.62)
┌─────────────────────────────────────────────────────┐
│ 生产服务器 (139.155.109.62) │
│ └── /home/novalon/docker-app/ │
│ ├── novalon-static/ ← 当前版本 │
│ ├── novalon-static_backup_* ← 自动备份
│ └── docker-compose.yml
│ ├── novalon-website/dist/ ← 当前版本 │
│ ├── novalon-website/dist_backup_* ← 自动备份 │
│ └── novalon-nginx/
│ └── novalon-nginx-secure ← Nginx 容器 │
└──────────────────────┬──────────────────────────────┘
│ 反向代理
@@ -226,7 +226,7 @@ else
fi
# 4.3 部署到生产环境
./deploy-dist.sh
./scripts/deploy.sh deploy --skip-build
# 脚本会自动执行:
# 1. 检查 dist 目录
@@ -551,7 +551,7 @@ git reset --hard HEAD
║ 2. git checkout <stable-commit-hash> ║
║ # 切换到稳定版本 ║
║ ║
║ 3. ./deploy-dist.sh
║ 3. ./scripts/deploy.sh deploy --skip-build
║ # 重新构建并部署 ║
║ ║
║ 验证命令: ║
@@ -598,7 +598,7 @@ git reset --hard HEAD
## 📚 **相关文档链接**
- **部署脚本**: [deploy-dist.sh](./deploy-dist.sh)
- **部署脚本**: [scripts/deploy.sh](../../scripts/deploy.sh)
- **Jenkins Pipeline**: [Jenkinsfile](./Jenkinsfile)
- **Sentry 监控指南**: [docs/sentry-setup-guide.md](./docs/sentry-setup-guide.md)
- **技术栈降级指南**: [scripts/downgrade-stack.sh](./scripts/downgrade-stack.sh)