forked from Abdulbari/sgeUpdated
Update sgeupdated pipeline v21+++
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
# .gitea/workflows/sgeupdated.yml
|
|
||||||
name: sgeUpdated CI/CD
|
name: sgeUpdated CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -56,30 +55,30 @@ jobs:
|
|||||||
if [ "$BACKEND_CHANGED" = true ]; then
|
if [ "$BACKEND_CHANGED" = true ]; then
|
||||||
echo "⚡ Backend changes detected."
|
echo "⚡ Backend changes detected."
|
||||||
cd sgeUpdated/sge-backend
|
cd sgeUpdated/sge-backend
|
||||||
echo "Would run Maven build here..."
|
echo "Running Maven build..."
|
||||||
# /opt/apache-maven-3.9.11/bin/mvn clean install -DskipTests
|
/opt/apache-maven-3.9.11/bin/mvn clean install -DskipTests
|
||||||
cd ../..
|
cd ../..
|
||||||
echo "Would rebuild backend Docker container..."
|
echo "Rebuilding backend Docker container..."
|
||||||
# docker compose up -d --build bgreen-backend
|
docker compose up -d --build bgreen-backend
|
||||||
else
|
else
|
||||||
echo "✅ No backend changes."
|
echo "✅ No backend changes."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Frontend section
|
# Frontend section
|
||||||
if [ "$FRONTEND_CHANGED" = true ]; then
|
if [ "$FRONTEND_CHANGED" = true ]; then
|
||||||
echo "⚡ Frontend changes detected.."
|
echo "⚡ Frontend changes detected."
|
||||||
cd sgeUpdated/sge-frontend
|
cd sgeUpdated/sge-frontend
|
||||||
echo "Would run npm build here..."
|
echo "Running npm build..."
|
||||||
# npm install
|
npm install
|
||||||
# npm run build
|
npm run build
|
||||||
cd ../..
|
cd ../..
|
||||||
echo "Would rebuild frontend Docker container..."
|
echo "Rebuilding frontend Docker container..."
|
||||||
# docker compose up -d --build bgreen-frontend
|
docker compose up -d --build bgreen-frontend
|
||||||
else
|
else
|
||||||
echo "✅ No frontend changes."
|
echo "✅ No frontend changes."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If no changes at all, just restart containers (commented for now)
|
# If no changes at all, just restart containers (commented out for now)
|
||||||
if [ "$BACKEND_CHANGED" = false ] && [ "$FRONTEND_CHANGED" = false ]; then
|
if [ "$BACKEND_CHANGED" = false ] && [ "$FRONTEND_CHANGED" = false ]; then
|
||||||
echo "♻️ No source changes detected. (Would restart containers here...)"
|
echo "♻️ No source changes detected. (Would restart containers here...)"
|
||||||
# docker compose up -d
|
# docker compose up -d
|
||||||
|
|||||||
Reference in New Issue
Block a user