From 9274d47fc896eb31415e44e2a7ea2f7361092e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Sabat=C3=A9=20Sol=C3=A0?= Date: Thu, 14 Mar 2024 11:39:11 +0100 Subject: [PATCH] ci: call the infra-restart binary on deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93b8e62..e024ff9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,3 +74,15 @@ jobs: docker login -u "${{ secrets.REGISTRY_USERNAME }}" -p "${{ secrets.REGISTRY_PASSWORD }}" ${{ secrets.REGISTRY_HOST }} docker push ${{ secrets.REGISTRY_HOST }}/${{ secrets.REGISTRY_USERNAME }}/operum:main docker logout ${{ secrets.REGISTRY_HOST }} + + # The server provides a small script named `service-restart` which will do + # the right thing to pull the new image of the desired service and re-run + # it. + - name: Restart service with the new code + uses: garygrossgarten/github-action-ssh@release + with: + command: infra-restart operum + host: ${{ secrets.REMOTE_HOST }} + username: ${{ secrets.REMOTE_USERNAME }} + passphrase: ${{ secrets.REMOTE_PASSPHRASE }} + privateKey: ${{ secrets.PRIVATE_KEY}}