Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
set -euo pipefail
npm ci
npm run build
tar -czf ../frontend_deploy.tar.gz build/ package.json package-lock.json
npm prune --omit=dev
tar -czf ../frontend_deploy.tar.gz build/ node_modules/ package.json package-lock.json

# --- DÉPLOIEMENT ---
- name: Prepare artifacts for deployment
Expand Down Expand Up @@ -66,12 +67,11 @@ jobs:
APP_DIR="/home/greenscore/www/app"

# 1. Gestion du FRONTEND
# Remove old build files
rm -rf "$APP_DIR/frontend/build"
# Remove previous frontend runtime files before extracting the new artifact
rm -rf "$APP_DIR/frontend/build" "$APP_DIR/frontend/node_modules"

cd "$APP_DIR/frontend/"
tar -xzf frontend_deploy.tar.gz
npm ci --omit=dev
rm frontend_deploy.tar.gz

# 2. Gestion du BACKEND
Expand Down
Loading