All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 22s
Core logic portable (economy, balance, cosmetics, migrateSave) — zero rewrite. 136 tests green, identiques. Backend inchangé. - Svelte 5 runes stores (game, auth, toast) remplacent Zustand - SvelteKit adapter-static SPA (dist/ output, fallback index.html) - Tailwind v4 conservé, design system .gp-* porté - Transitions natives : slide, fly, scale, fade sur toute l'UI - Sidebar tabbée (Production/Evolution/Collection) + CollapsiblePanel - Mobile bottom sheet avec FAB toggle + backdrop blur - Click particles réactifs Svelte (plus de DOM impératif) - TadpoleSprite bounce + glow ring au clic - Guide refait en accordéon, Achievements avec filtres - a11y : focus-visible, Escape modals, aria-current, aria-labels - CI/CD adapté (tests + build + rsync) - Build 504K (vs ~1.2MB React)
35 lines
744 B
Bash
Executable File
35 lines
744 B
Bash
Executable File
#!/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 (Svelte 5 + SvelteKit)
|
|
echo "--- Building frontend (Svelte)..."
|
|
cd Frontend
|
|
npm ci
|
|
npx vitest run
|
|
npm run build
|
|
echo "--- Copying dist to /var/www/clickerz/frontend/dist..."
|
|
mkdir -p /var/www/clickerz/frontend/dist
|
|
rsync -a --delete dist/ /var/www/clickerz/frontend/dist/
|
|
cd ..
|
|
|
|
# 3. Backend deps
|
|
echo "--- Installing backend deps..."
|
|
cd Backend
|
|
npm ci --omit=dev
|
|
cd ..
|
|
|
|
# 4. Restart pm2
|
|
echo "--- Restarting pm2..."
|
|
pm2 startOrRestart ecosystem.config.cjs --env production
|
|
pm2 save
|
|
|
|
echo "=== Deploy complete ==="
|