From 8fdcbcf4465d5512b0e82380f02373452db13504 Mon Sep 17 00:00:00 2001 From: Son Daehyeon Date: Fri, 30 Aug 2024 23:13:31 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20CI/CD=20Pipeline=20=EA=B5=AC=EC=B6=95?= =?UTF-8?q?=20(#10)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..a76a1d3 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,26 @@ +name: Deploy + +on: + push: + branches: + - develop + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Deploy to server + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + port: ${{ secrets.SSH_PORT }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + script: | + cd ~/Backend + git checkout develop + git pull origin develop + ./gradlew build + pkill -f 'java -jar Backend.jar' + java -jar build/libs/Backend.jar &