From 974972222acb9ae1a2bbb5c235cb25123579dc51 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Wed, 9 Apr 2025 10:26:04 +0200 Subject: [PATCH] =?UTF-8?q?Vylep=C5=A1en=C3=AD=20CI=20pipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yaml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index b98d467..7b37197 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,4 +1,4 @@ -name: Build +name: Build and Publish on: push: @@ -15,6 +15,8 @@ env: jobs: build: runs-on: ubuntu-latest + outputs: + artifact-name: build-output steps: - name: Checkout repository @@ -28,7 +30,24 @@ jobs: - name: Build run: ./zola build - - name: Deploy + - name: Upload site artifact + uses: actions/upload-artifact@v4 + with: + name: build-output + path: public/ + + publish: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Download site artifact + uses: actions/download-artifact@v4 + with: + name: build-output + path: public + + - name: Deploy via rsync over SSH run: | apt update -y && apt-get install -y --no-install-recommends rsync eval "$(ssh-agent -s)"