From d1647a155fbed94742d98cc2361819979b552231 Mon Sep 17 00:00:00 2001 From: server Date: Thu, 30 Oct 2025 08:23:34 +0000 Subject: [PATCH] ignore local deploy.sh --- .gitignore | 1 + deploy.sh | 45 --------------------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100755 deploy.sh diff --git a/.gitignore b/.gitignore index 171f367..cbe2447 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ yarn-error.log* # TypeScript *.tsbuildinfo node_modules +deploy.sh diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index b678af7..0000000 --- a/deploy.sh +++ /dev/null @@ -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."