From 4bab3f3efe89f37dda52658a5070a61640d6bf6a Mon Sep 17 00:00:00 2001 From: Leo Nicolle Date: Sun, 11 Feb 2024 23:47:51 +0100 Subject: [PATCH] use appleboy ssh action --- .github/workflows/deploy.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index af5d7ba..b77206f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -43,7 +43,13 @@ jobs: - name: Deploy if: ${{ success() }} - run: | + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USERNAME }} + port: 22 + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | if [[ "${{ env.DEPLOY_ASSETS }}" == 'true' ]]; then echo "Deploying JS assets" ssh $SSH_TARGET "rm -rf $ASSETS && mkdir -p $ASSETS"