feat(sprint1-step6): polish, landing page, responsive, deploy config
- Landing.jsx : écran d'accueil "Entrer dans le Marais" sur / - Home.jsx : jeu sur /jeu, click animation float-up, sidebar responsive - formatNumber.ts : util partagé k/M/B/T (remplace 4 copies locales) - home.scss : rewrite classes (game-cover, click-zone, tadpole-sprite, game-sidebar) - Responsive : sidebar fixe desktop, drawer bottom mobile (<768px) - navbar : wildCoin → resource-counter, auth-nav stylé, dead code supprimé - GameSync.tsx : bridge useSaveSync ↔ Zustand (câblé dans App) - tadpole.svg : asset renommé (SantaClause-bag → tadpole) - deploy/ : Apache vhost SPA+proxy, deploy.sh, ecosystem.config.cjs PM2 - NavBarData : Jeu → /jeu - Cleanup : dead imports, commentaires legacy
This commit is contained in:
39
deploy/deploy.sh
Executable file
39
deploy/deploy.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
# deploy.sh — Build & deploy clickerz to VPS
|
||||
# Usage: ssh vps 'cd /opt/clickerz && bash deploy/deploy.sh'
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== Clickerz deploy ==="
|
||||
|
||||
# 1. Pull latest
|
||||
git pull --ff-only
|
||||
|
||||
# 2. Build frontend
|
||||
echo "--- Building frontend..."
|
||||
cd Frontend
|
||||
npm ci --production=false
|
||||
npm run build
|
||||
echo "--- Copying dist to /var/www/clickerz..."
|
||||
sudo rm -rf /var/www/clickerz
|
||||
sudo cp -r dist /var/www/clickerz
|
||||
cd ..
|
||||
|
||||
# 3. Backend deps
|
||||
echo "--- Installing backend deps..."
|
||||
cd Backend
|
||||
npm ci --production
|
||||
cd ..
|
||||
|
||||
# 4. Run migrations
|
||||
echo "--- Running DB migrations..."
|
||||
cd Backend
|
||||
npm run db:migrate
|
||||
cd ..
|
||||
|
||||
# 5. Restart pm2
|
||||
echo "--- Restarting pm2..."
|
||||
pm2 startOrRestart ecosystem.config.cjs --env production
|
||||
pm2 save
|
||||
|
||||
echo "=== Deploy complete ==="
|
||||
Reference in New Issue
Block a user