From 1de641763fb203638493f46904c881b6283c0dd5 Mon Sep 17 00:00:00 2001 From: Filip Rojek Date: Thu, 7 Dec 2023 17:41:09 +0100 Subject: [PATCH] Actions - added deploy --- .gitea/workflows/build.yaml | 42 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 179395b..94cbe98 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -29,24 +29,28 @@ jobs: needs: build runs-on: ubuntu-latest if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master' && success() + steps: - - name: Deploy to server + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Zola + uses: taiki-e/install-action@v2 + with: + tool: zola@0.17.2 + + - name: Build Zola Website run: | - scp "./public ${{ secrets.SERVER_IP }}:/srv/www/cz/pkmples/www" -# 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.DEPLOY_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" -# + zola build + + - name: Deploy to server + uses: AEnterprise/rsync-deploy@v1.0.2 + env: + DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} + ARGS: "-e -c -r --delete" + SERVER_PORT: 22 + FOLDER: "./public" + SERVER_IP: ${{ secrets.SERVER_IP }} + USERNAME: ${{ secrets.USERNAME }} + SERVER_DESTINATION: "/srv/www/cz/pkmples/www" +