Security: Upgrade Next.js to 15.5.7 and fix deploy.yml path

This commit is contained in:
QuantBot
2026-06-16 18:33:59 +08:00
parent 40ff08cad0
commit c02f37f91d
2 changed files with 17 additions and 13 deletions

View File

@@ -30,12 +30,11 @@ jobs:
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: platform/web/package-lock.json
- name: Run Frontend Linting
run: |
cd platform/web
npm ci
npm install --legacy-peer-deps
npm run lint || true
deploy-docker:
@@ -54,20 +53,25 @@ jobs:
script: |
echo "🚀 [Deploy] Starting deployment for 2026fifa.wooo.work"
# 進入專案目錄
cd /opt/2026FIFAWorldCup
# 確保目錄存在
mkdir -p /opt/fifa2026/current
cd /opt/fifa2026/current
# 抓取最新程式碼
git pull origin main
# 若不是 git repo 則初始化並綁定
if [ ! -d ".git" ]; then
echo "Initializing git repository..."
git init
git remote add origin https://github.com/tsenyang/2026FIFAWorldCup.git || true
git fetch origin
git checkout -b main || true
git reset --hard origin/main
else
git pull origin main
fi
# 使用 Docker Compose 重新建置並平滑重啟容器
# --build: 強制重新編譯 Dockerfile (前端靜態檔與後端依賴)
# -d: 背景執行
docker-compose -f docker-compose.prod.yml up --build -d
# 執行資料庫遷移 (若使用 Alembic)
# docker exec quant_backend alembic upgrade head
# 清理閒置的舊 Image 釋放伺服器空間
docker image prune -f