fix: Update deployment script to change directory before running commands
All checks were successful
Update Memento Dev on VPS / deploy (push) Successful in 3m31s

This commit is contained in:
Gauthier Daniels 2025-04-17 13:23:12 +02:00
parent 6e3d64cda4
commit 8412788ef6

View File

@ -38,7 +38,7 @@ jobs:
VPS_PATH: ${{ secrets.VPS_PATH }}
VPS_PORT: ${{ secrets.VPS_PORT }}
run: |
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "docker compose build"
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose build"
echo "📦 The services have been builded on the VPS."
- name: Installing the dependencies
@ -48,7 +48,7 @@ jobs:
VPS_PATH: ${{ secrets.VPS_PATH }}
VPS_PORT: ${{ secrets.VPS_PORT }}
run: |
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "docker compose run --rm memento-dev install"
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose run --rm memento-dev install"
echo "📦 The dependencies has been installed."
- name: Building the application
@ -58,7 +58,7 @@ jobs:
VPS_PATH: ${{ secrets.VPS_PATH }}
VPS_PORT: ${{ secrets.VPS_PORT }}
run: |
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "docker compose run --rm memento-dev build"
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose run --rm memento-dev build"
echo "📦 The application have been builded on the VPS."
- name: Restart the application
@ -68,5 +68,5 @@ jobs:
VPS_PATH: ${{ secrets.VPS_PATH }}
VPS_PORT: ${{ secrets.VPS_PORT }}
run: |
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "docker compose restart"
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose restart"
echo "🚀 The application has been started on the VPS."