diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 5d03c5e..e2bacff 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -59,4 +59,4 @@ jobs: env: SSH_PASS: ${{ secrets.VPS_SSH_PASS }} # Mot de passe SSH depuis les secrets run: | - sshpass -p "$SSH_PASS" ssh -o StrictHostKeyChecking=no root@${{ secrets.VPS_IP }} 'bash -s' < ./run.sh # Exécute le script "deploy.sh" sur le VPS + sshpass -p "$SSH_PASS" ssh -o StrictHostKeyChecking=no root@${{ secrets.VPS_IP }} 'bash -s' < ./deploy.sh # Exécute le script "deploy.sh" sur le VPS diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..00cd762 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Pull the latest changes +cd /var/www/invoice/ +git pull origin main # Change 'main' to your branch if needed + +# Build and start the Docker containers +docker-compose up -d + +echo "Deployment completed."