From d7caf4a6a6be983ab290a3ff4269eae1d2294748 Mon Sep 17 00:00:00 2001 From: Victor Melnik Date: Thu, 8 Oct 2020 21:56:00 +0300 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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..54071cb --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,29 @@ +name: deploy + +on: + create: + tags: [v*] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Build app with Gradle + run: chmod +x gradlew && ./gradlew shadowJar + + - uses: actions/checkout@v2 + - name: Copy app to server + uses: appleboy/scp-action@v0.1.1 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + password: ${{ secrets.SSH_PASS }} + port: ${{ secrets.SSH_PORT }} + source: "build/libs/SimilarImagesBot-1.0.2-all.jar" + target: "bots/similar-images-bot"