ignore local deploy.sh
All checks were successful
sgeUpdated CI/CD / deploy (push) Successful in 7s

This commit is contained in:
2025-10-30 08:23:34 +00:00
parent 4ac78b1f4e
commit d1647a155f
2 changed files with 1 additions and 45 deletions

1
.gitignore vendored
View File

@@ -36,3 +36,4 @@ yarn-error.log*
# TypeScript
*.tsbuildinfo
node_modules
deploy.sh

View File

@@ -1,45 +0,0 @@
#!/bin/bash
set -euo pipefail
cd /home/ubuntu/Bgreen/AyposWeb
echo "Fetching latest changes from origin/main..."
git fetch origin main
CHANGED_FILES=$(git diff --name-only HEAD origin/main || true)
if [ -z "$CHANGED_FILES" ]; then
echo "No file changes detected."
else
echo "Changed files:"
echo "$CHANGED_FILES"
fi
git reset --hard origin/main
FRONTEND_CHANGED=false
if echo "$CHANGED_FILES" | grep -qv "README\.md$"; then
FRONTEND_CHANGED=true
fi
if [ "$FRONTEND_CHANGED" = true ]; then
echo "Frontend changes detected."
if echo "$CHANGED_FILES" | grep -qE "^(package\.json|package-lock\.json)$"; then
echo "Package files changed. Running npm install and build..."
npm install
npm run build
else
echo "Only code changes detected. Running build..."
npm run build
fi
cd ..
echo "Rebuilding frontend container..."
docker compose up -d --build aypos-frontend
else
echo "No frontend changes."
fi
echo "Deployment complete."