Final deployment test

This commit is contained in:
Hamza-Ayed
2026-04-16 23:57:50 +03:00
parent 62a6852fd2
commit 88d949205f

View File

@@ -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