From 4325466f80d2db922ae4039f4c8fc3ff2dc2836f Mon Sep 17 00:00:00 2001 From: Luca Bernstein Date: Sat, 10 Sep 2022 17:15:45 +0200 Subject: [PATCH] Auto-deploy lb_bean_bot on release (#184) --- .github/workflows/docker.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 11b20bc..be5840d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -47,3 +47,19 @@ jobs: docker push ${{ env.IMAGE_NAME }}:${GITHUB_REF##*/} # Only push 'release' if REF startsWith 'v' [[ ${GITHUB_REF##*/} = v* ]] && docker push ${{ env.IMAGE_NAME }}:release || echo "Not a release tag" + + deploy: + runs-on: ubuntu-latest + needs: build + if: github.event_name != 'pull_request' + steps: + - name: Deploy lb_bean_bot + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.DEPLOY_HOST }} + username: ${{ secrets.DEPLOY_USERNAME }} + key: ${{ secrets.DEPLOY_KEY_PRIV }} + # Key creation: + # ssh-keygen -t ed25519 -C gh_docker_deploy_beancount_bot + # In authorized_keys: + # command="/home/admin/docker-compose-recipes/_s2/beancount-tg/update.sh prod" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxWEI6q0z1rb9xHGlHs6Bj1kFyRQXuhi+XdAfj0zRgA gh_docker_deploy_beancount_bot