From 88d949205f2649b33a8eb42127d27bd034068e0e Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Thu, 16 Apr 2026 23:57:50 +0300 Subject: [PATCH] Final deployment test --- sync-to-server.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sync-to-server.sh b/sync-to-server.sh index 483eee1..1a236f1 100755 --- a/sync-to-server.sh +++ b/sync-to-server.sh @@ -23,23 +23,25 @@ git push origin main # Update the variables below with your VPS credentials SERVER_USER="root" SERVER_IP="194.163.173.157" # Contabo VPS -PROJECT_DIR="/home/intaleqapp-musadeq/htdocs" +PROJECT_DIR="/home/intaleqapp-musadeq/htdocs/musadeq.intaleqapp.com" echo "🌐 Synchronizing with production server ($SERVER_IP)..." ssh $SERVER_USER@$SERVER_IP << EOF - git config --global --add safe.directory $PROJECT_DIR - mkdir -p $PROJECT_DIR cd $PROJECT_DIR + git config --global --add safe.directory $PROJECT_DIR if [ ! -d ".git" ]; then echo "🌑 Initializing production repository (Force setup in non-empty dir)..." git init + git config --global --add safe.directory $PROJECT_DIR git remote add origin https://git.intaleqapp.com/Hamza/musadeq.git git fetch --all git reset --hard origin/main else echo "⬇️ Pulling latest changes from Git..." + # In case remote was lost or ownership changed + git remote add origin https://git.intaleqapp.com/Hamza/musadeq.git 2>/dev/null git pull origin main fi