#!/bin/bash

# Jordan Bot - Deployment Script
# This script automates the process of pushing changes to your Git repository.

echo "🚀 Starting deployment process..."

# 1. Add all changes
git add .

# 2. Create an automatic commit message with the current date and time
commit_msg="Update: $(date +'%Y-%m-%d %H:%M:%S')"
echo "📝 Commit Message: $commit_msg"
git commit -m "$commit_msg"

# 3. Push to the main branch
echo "📤 Pushing to repository..."
git push origin main

echo "✅ Deployment successful!"
echo "--------------------------------------"
echo "💡 Next steps on the server:"
echo "1. Connect via SSH"
echo "2. Run: git pull origin main"
echo "3. Run: cd backend && composer install"
echo "--------------------------------------"
