From 44a482d8c620d8f66b8f4c1187f33a712d1b1488 Mon Sep 17 00:00:00 2001 From: Conchez-Boueytou Robin Date: Wed, 1 Apr 2026 10:41:19 +0200 Subject: [PATCH] :construction_worker: npm ci dans le conteneur github --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 08880ec..fb7c6c0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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