From ca6dc3d16eea1108fbcb7c584f06bd0955658750 Mon Sep 17 00:00:00 2001 From: xengi Date: Sun, 15 Feb 2026 13:16:54 +0100 Subject: [PATCH] Update .forgejo/workflows/deploy.yaml Signed-off-by: xengi --- .forgejo/workflows/deploy.yaml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 040d3e7..e0b7704 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -9,22 +9,23 @@ on: jobs: deploy: runs-on: ubuntu-latest - steps: - - name: Checkout repo - run: | - apk --no-cache add git - git clone -b ${{ env.FORGEJO_REF_NAME }} https://git.berlin.ccc.de/cccb-website-team/www.git . - git status - exit 1 - + steps: - name: Install dependencies - run: apk --no-cache add hugo python3 py3-pip - + run: apk --no-cache add hugo python3 py3-pip git + - name: Check install run: | + cat /etc/os-release + git version hugo version python --version + - name: Checkout repo + run: | + git clone -b ${{ forgejo.ref_name }} https://git.berlin.ccc.de/cccb-website-team/www.git . + git status + exit 1 + - name: Install Python depenndencies run: python -m pip install -r requirements.txt @@ -36,11 +37,11 @@ jobs: echo ${{ secrets.SSH_PRIVATE_KEY }} > id_ed25519 chmod 600 id_ed25519 - name: Sync rendered site to staging - if: forgejo.ref == 'refs/heads/staging' + if: forgejo.ref_name == 'staging' run: rsync -var -e 'ssh -i id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www-staging/ continue-on-error: true - name: Sync rendered site to production - if: forgejo.ref == 'refs/heads/production' + if: forgejo.ref_name == 'production' run: rsync -var -e 'ssh -i id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www/ continue-on-error: true - name: Cleanup