chore: 部署脚本增加自动清理旧 blog-mysql 容器逻辑
Build and Deploy Blog / deploy (push) Successful in 24s

This commit is contained in:
2026-10-22 15:42:38 +08:00
parent 0ead154dc9
commit ea09c73f2b
2 changed files with 9 additions and 2 deletions
+3
View File
@@ -15,6 +15,9 @@ jobs:
- name: Build and Restart Docker Containers
run: |
echo "🚀 [CI/CD] 检测到代码更新,开始执行自动部署..."
# 清理此前遗留的独立 blog-mysql 容器(若存在)
docker stop blog-mysql 2>/dev/null || true
docker rm blog-mysql 2>/dev/null || true
docker compose down
docker compose up -d --build
echo "✅ [CI/CD] 容器重构完成,最新版本已上线!"