From f3f8504cdc9f83f26a58314aaa01d7ebf7551573 Mon Sep 17 00:00:00 2001 From: geleeroyale Date: Mon, 5 Aug 2024 18:04:28 +0200 Subject: [PATCH] Create deploy-only.yml --- .github/workflows/deploy-only.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/deploy-only.yml diff --git a/.github/workflows/deploy-only.yml b/.github/workflows/deploy-only.yml new file mode 100644 index 0000000..cfe6178 --- /dev/null +++ b/.github/workflows/deploy-only.yml @@ -0,0 +1,27 @@ +name: ci + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: SSH and Redeploy + uses: appleboy/ssh-action@v1.0.0 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.SSH_PRIVATEKEY }} + port: ${{ secrets.SSH_PORT }} + debug: true + script: | + cd ~/givpower-bots/givpower-bot-optimism-production + docker compose stop givpower-bot + docker compose pull givpower-bot + docker compose up -d givpower-bot + cd ~/givpower-bots/givpower-bot-xdai-production + docker compose stop givpower-bot + docker compose pull givpower-bot + docker compose up -d givpower-bot + docker image prune -a --force