diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 79434c4..d484ee5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -34,4 +34,20 @@ jobs: context: . file: ./.docker/migrations/Dockerfile push: true - tags: bifidokk/whisper-bot-migrations:latest \ No newline at end of file + tags: bifidokk/whisper-bot-migrations:latest + + - name: Restart Docker compose with fresh images + uses: appleboy/ssh-action@v0.1.10 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + script_stop: true + script: | + cd /var/www/whisper-bot + git pull + docker image prune --all --force + docker compose --file ./.docker/docker-compose.yml --env-file ./.docker/.env.prod pull + docker compose --file ./.docker/docker-compose.yml --env-file ./.docker/.env.prod down + docker compose --file ./.docker/docker-compose.yml --env-file ./.docker/.env.prod up -d + \ No newline at end of file