From 88a312d37ca32fb6e7c94fa14d97af0d169cfc70 Mon Sep 17 00:00:00 2001 From: Abdulbari Date: Sat, 30 Aug 2025 21:04:54 +0300 Subject: [PATCH] Update sgeupdated pipeline v15 forgot to add the dependencies installation --- .gitea/workflows/sgeupdated.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/sgeupdated.yml b/.gitea/workflows/sgeupdated.yml index 7db6045..2542f23 100644 --- a/.gitea/workflows/sgeupdated.yml +++ b/.gitea/workflows/sgeupdated.yml @@ -24,19 +24,30 @@ jobs: cd /home/ubuntu/sgeUpdated git pull origin main - echo "Detecting changes..." + echo "🔍 Detecting changes..." CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD) # --- Backend --- - if echo "$CHANGED_FILES" | grep -q "sge-backend"; then - echo "⚙️ Backend changes detected..." + if echo "$CHANGED_FILES" | grep -q "^sge-backend/"; then + echo "⚙️ Backend changes detected. Rebuilding backend..." + cd sge-backend + mvn clean install -DskipTests + cd .. docker compose build --no-cache backend docker compose up -d --force-recreate backend + else + echo "✅ No backend changes detected." fi # --- Frontend --- - if echo "$CHANGED_FILES" | grep -q "sge-frontend"; then - echo "⚙️ Frontend changes detected..." + if echo "$CHANGED_FILES" | grep -q "^sge-frontend/"; then + echo "⚙️ Frontend changes detected. Rebuilding frontend..." + cd sge-frontend + npm install + npm run build + cd .. docker compose build --no-cache frontend docker compose up -d --force-recreate frontend + else + echo "✅ No frontend changes detected." fi