From 15f1d76dd856f61b52b35bdcefa76f3b2f865d17 Mon Sep 17 00:00:00 2001 From: Filip Rojek Date: Thu, 7 Dec 2023 17:08:32 +0100 Subject: [PATCH] Actions - added deploy --- .gitea/workflows/build.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 213c81e..bc9b8fb 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -4,6 +4,9 @@ on: push: branches: - master + pull_request: + branches: + - master jobs: build: @@ -22,3 +25,20 @@ jobs: run: | zola build + deploy: + needs: build + runs-on: ubuntu-latest + if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master' && success() + + steps: + - name: Deploy to server + uses: AEnterprise/rsync-deploy@v1.0.2 + env: + DEPLOY_KEY: ${{ secrets.SERVER_SSH_KEY }} + ARGS: "-e -c -r --delete" + SERVER_PORT: 22 + FOLDER: "./" + SERVER_IP: ${{ secrets.SERVER_IP }} + USERNAME: ${{ secrets.USERNAME }} + SERVER_DESTINATION: "/srv/www/cz/pkmples/www" +