Update sgeupdated pipeline v11

This commit is contained in:
2025-08-30 01:28:12 +03:00
parent 986bec559b
commit 926c6b0b66

View File

@@ -28,30 +28,30 @@ jobs:
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/ubuntu/sgeUpdated
git pull origin main
cd /home/ubuntu/sgeUpdated
git pull origin main
# --- Backend ---
if echo "${CHANGED_FILES}" | grep -q "sge-backend"; then
echo "Backend changes detected..."
cd sge-backend
mvn clean install
docker build --no-cache -t bgreen-backend .
cd ..
docker compose up -d --force-recreate backend
# --- Backend ---
if echo "${CHANGED_FILES}" | grep -q "sge-backend"; then
echo "Backend changes detected..."
cd sge-backend
mvn clean install
cd ..
docker build -t bgreen-backend ./sge-backend
docker compose up -d --force-recreate backend
fi
# --- Frontend ---
if echo "${CHANGED_FILES}" | grep -q "sge-frontend"; then
echo "Frontend changes detected..."
cd sge-frontend
if echo "${CHANGED_FILES}" | grep -q "sge-frontend/package.json"; then
echo "package.json changed → installing dependencies"
npm install
fi
npm run build
cd ..
docker build -t bgreen-frontend ./sge-frontend
docker compose up -d --force-recreate frontend
fi
# --- Frontend ---
if echo "${CHANGED_FILES}" | grep -q "sge-frontend"; then
echo "Frontend changes detected..."
cd sge-frontend
if echo "${CHANGED_FILES}" | grep -q "sge-frontend/package.json"; then
echo "package.json changed → installing dependencies"
npm install
fi
npm run build
docker build --no-cache -t bgreen-frontend .
cd ..
docker compose up -d --force-recreate frontend
fi