fix: Update Docker compose command to build application
All checks were successful
Update Memento Dev on VPS / deploy (push) Successful in 21m3s

This commit is contained in:
Gauthier Daniels 2025-04-17 14:33:15 +02:00
parent e9ecd33362
commit f0da2bb2ed

View File

@ -34,26 +34,6 @@ jobs:
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && git pull origin main" ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && git pull origin main"
echo "🚀 The main branch has been pulled on the VPS." echo "🚀 The main branch has been pulled on the VPS."
- name: Building the Docker services
env:
VPS_USER: ${{ secrets.VPS_USER }}
VPS_HOST: ${{ secrets.VPS_HOST }}
VPS_PATH: ${{ secrets.VPS_PATH }}
VPS_PORT: ${{ secrets.VPS_PORT }}
run: |
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
env:
VPS_USER: ${{ secrets.VPS_USER }}
VPS_HOST: ${{ secrets.VPS_HOST }}
VPS_PATH: ${{ secrets.VPS_PATH }}
VPS_PORT: ${{ secrets.VPS_PORT }}
run: |
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 - name: Building the application
env: env:
VPS_USER: ${{ secrets.VPS_USER }} VPS_USER: ${{ secrets.VPS_USER }}
@ -61,19 +41,9 @@ jobs:
VPS_PATH: ${{ secrets.VPS_PATH }} VPS_PATH: ${{ secrets.VPS_PATH }}
VPS_PORT: ${{ secrets.VPS_PORT }} VPS_PORT: ${{ secrets.VPS_PORT }}
run: | run: |
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose run --rm memento-dev build" ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose -f compose-prod.yml build --no-cache"
echo "📦 The application have been builded on the VPS." echo "📦 The application have been builded on the VPS."
- name: Stop the application
env:
VPS_USER: ${{ secrets.VPS_USER }}
VPS_HOST: ${{ secrets.VPS_HOST }}
VPS_PATH: ${{ secrets.VPS_PATH }}
VPS_PORT: ${{ secrets.VPS_PORT }}
run: |
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose down"
echo "🚀 The application has been started on the VPS."
- name: Start the application - name: Start the application
env: env:
VPS_USER: ${{ secrets.VPS_USER }} VPS_USER: ${{ secrets.VPS_USER }}