From 1ebff4b5ce07b3cab0ab34f4ee167c14a3fcc9bd Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 30 Apr 2024 17:43:29 +0300 Subject: [PATCH] added action for server --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..3a098c5 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Deploy to Server + +on: + push: + branches: + # - master + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup SSH + uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Docker Deploy + run: | + ssh -o "StrictHostKeyChecking=no" ubuntu@15.236.36.30 "cd spark-matcher && git pull && docker run --restart=always -d spot-market-matcher-fuel-btc"