From ef0df4877d80c965a2156f2908cdc3b0baf2c0ef Mon Sep 17 00:00:00 2001 From: xengi Date: Sun, 15 Feb 2026 13:31:22 +0100 Subject: [PATCH] Update .forgejo/workflows/deploy.yaml Signed-off-by: xengi --- .forgejo/workflows/deploy.yaml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 6c41cd8..3e753e9 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -9,14 +9,7 @@ on: jobs: deploy: runs-on: ubuntu-latest - steps: - - name: System checks - run: | - ip a - ip r - ip -6 r - cat /etc/resolv.conf - + steps: - name: Install dependencies run: apk --no-cache add hugo python3 py3-pip git @@ -27,29 +20,33 @@ jobs: hugo version python --version + - name: Install Python depenndencies + run: python -m pip install -r requirements.txt + - 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 - name: Render site run: ./build.sh - name: Setup SSH key run: | - echo ${{ secrets.SSH_PRIVATE_KEY }} > id_ed25519 - chmod 600 id_ed25519 + mkdir -p .ssh + echo ${{ secrets.SSH_PRIVATE_KEY }} > .ssh/id_ed25519 + chmod 600 .ssh/id_ed25519 + ssh-keygen -f .ssh/id_ed25519 -y > .ssh/id_ed25519.pub + cat .ssh/id_ed25519.pub + - name: Sync rendered site to staging if: forgejo.ref_name == 'staging' - run: rsync -var -e 'ssh -i id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www-staging/ + run: rsync -var -e 'ssh -i .ssh/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_name == 'production' - run: rsync -var -e 'ssh -i id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www/ + run: rsync -var -e 'ssh -i .ssh/id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www/ continue-on-error: true + - name: Cleanup - run: rm -rf id_ed25519 + run: rm -rf .ssh