diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 13f3009..038362d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,9 +36,11 @@ jobs: - name: Upload docker-compose.yml to server run: scp -o StrictHostKeyChecking=no docker-compose.yml ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home/${{ secrets.SSH_USER }}/munera - - name: Deploy on server - run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF' - cd /home/${{ secrets.SSH_USER }}/munera - docker-compose down - docker-compose up --build -d - EOF + - name: Deploy on server - Change directory + run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd /home/${{ secrets.SSH_USER }}/munera' + + - name: Deploy on server - Stop Docker containers + run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd /home/${{ secrets.SSH_USER }}/munera && docker-compose down' + + - name: Deploy on server - Start Docker containers + run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd /home/${{ secrets.SSH_USER }}/munera && docker-compose up --build -d'