From e41eebc24854e7e742fa0aba59f453ab487a67c9 Mon Sep 17 00:00:00 2001 From: anteqkois Date: Fri, 31 May 2024 11:40:16 +0200 Subject: [PATCH] ci(docker): change docker command --- .../workflows/build-and-deploy-api-gateway.yml | 1 - .github/workflows/build-and-deploy-web.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-api-gateway.yml b/.github/workflows/build-and-deploy-api-gateway.yml index 48e2c3e7..28496175 100644 --- a/.github/workflows/build-and-deploy-api-gateway.yml +++ b/.github/workflows/build-and-deploy-api-gateway.yml @@ -56,7 +56,6 @@ jobs: script: | cd api.linkerry.com/ docker-compose pull - docker compose up --force-recreate --build -d docker-compose up -d --no-deps --build api-gateway - name: Clear DO container registry run: doctl registry garbage-collection start diff --git a/.github/workflows/build-and-deploy-web.yml b/.github/workflows/build-and-deploy-web.yml index d8558dc2..be99d2fb 100644 --- a/.github/workflows/build-and-deploy-web.yml +++ b/.github/workflows/build-and-deploy-web.yml @@ -51,3 +51,19 @@ jobs: run: docker tag linkerry/web registry.digitalocean.com/linkerry/web:latest - name: Push image to DO Container Registry run: docker push registry.digitalocean.com/linkerry/web:latest + - name: Connect to VPS and refresh docker compose + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.VPS_IP }} + username: root + key: ${{ secrets.SSH_PASSPHRASE_PRIVATE_KEY }} + passphrase: ${{ secrets.SSH_PASSPHRASE }} + port: 22 + script: | + cd linkerry.com/ + docker-compose pull + docker compose up --force-recreate --build -d + docker-compose up -d --no-deps --build api-gateway + - name: Clear DO container registry + run: doctl registry garbage-collection start +