From 349612e0703e82cc29ff2c2e8215896515e35abd Mon Sep 17 00:00:00 2001 From: tesence Date: Sat, 24 Aug 2024 17:21:44 +0200 Subject: [PATCH] Update CI to deploy image on push --- .github/workflows/{image.yml => ci.yml} | 11 +++++++++++ 1 file changed, 11 insertions(+) rename .github/workflows/{image.yml => ci.yml} (58%) diff --git a/.github/workflows/image.yml b/.github/workflows/ci.yml similarity index 58% rename from .github/workflows/image.yml rename to .github/workflows/ci.yml index 4ed1071..3c28cfd 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/ci.yml @@ -31,3 +31,14 @@ jobs: context: . push: true tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/gumo:latest + + - name: Deploy new image + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + port: ${{ secrets.SSH_PORT }} + key: ${{ secrets.SSH_KEY }} + script: | + docker compose --file ${{ secrets.DOCKER_COMPOSE_FILE }} down --rmi all gumo + docker compose --file ${{ secrets.DOCKER_COMPOSE_FILE }} up -d --force-recreate gumo