From 3f82ae04ef75f45ae196c217acc8b8609f4f0ea7 Mon Sep 17 00:00:00 2001 From: DeNNiiInc Date: Sun, 21 Dec 2025 16:00:18 +1100 Subject: [PATCH] Remove git pull from deployment script for CloudSticks - CloudSticks handles auto-deployment from GitHub - Removed redundant git pull step - Updated step numbers accordingly --- deploy-production.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/deploy-production.sh b/deploy-production.sh index fd87031..be6357d 100644 --- a/deploy-production.sh +++ b/deploy-production.sh @@ -25,19 +25,13 @@ cd "$PROJECT_DIR" || { echo -e "${RED}โŒ Project directory not found!${NC}"; ex echo -e "${GREEN}โœ… In directory: $(pwd)${NC}" echo "" -# Step 2: Pull latest code -echo "๐Ÿ“ฅ Pulling latest code from GitHub..." -git pull origin main || { echo -e "${RED}โŒ Git pull failed!${NC}"; exit 1; } -echo -e "${GREEN}โœ… Code updated${NC}" -echo "" - -# Step 3: Install dependencies +# Step 2: Install dependencies echo "๐Ÿ“ฆ Installing dependencies..." npm install || { echo -e "${RED}โŒ npm install failed!${NC}"; exit 1; } echo -e "${GREEN}โœ… Dependencies installed${NC}" echo "" -# Step 4: Check if db.config.js exists +# Step 3: Check if db.config.js exists echo "๐Ÿ” Checking for db.config.js..." if [ ! -f "db.config.js" ]; then echo -e "${YELLOW}โš ๏ธ db.config.js not found!${NC}" @@ -65,7 +59,7 @@ else fi echo "" -# Step 5: Restart Node.js server with PM2 +# Step 4: Restart Node.js server with PM2 echo "๐Ÿ”„ Restarting Node.js server..." if pm2 list | grep -q "$PM2_APP_NAME"; then echo "Restarting existing PM2 process..." @@ -79,12 +73,12 @@ pm2 save echo -e "${GREEN}โœ… Server restarted${NC}" echo "" -# Step 6: Show server status +# Step 5: Show server status echo "๐Ÿ“Š Server Status:" pm2 status echo "" -# Step 7: Test API endpoint +# Step 6: Test API endpoint echo "๐Ÿงช Testing API endpoint..." sleep 2 # Give server time to start API_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:$NODE_PORT/api/db-status) @@ -97,7 +91,7 @@ else fi echo "" -# Step 8: Show recent logs +# Step 7: Show recent logs echo "๐Ÿ“‹ Recent server logs:" pm2 logs "$PM2_APP_NAME" --lines 20 --nostream echo ""