From 0aeb73fc1ec82a4a7d4b6951896efcdb866f8fad Mon Sep 17 00:00:00 2001 From: Lucas Hahmann Date: Tue, 19 May 2026 10:06:40 +0200 Subject: [PATCH] Add dependencys --- .gitea/workflows/deploy.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 6897446..15b55c5 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -9,10 +9,9 @@ jobs: deploy: runs-on: ubuntu-24.04 container: - image: klakegg/hugo:ext-alpine # Wir bleiben bei Alpine + image: klakegg/hugo:ext-alpine env: - # Proxy-Einstellungen (WICHTIG!) http_proxy: http://172.16.10.93:3128 https_proxy: http://172.16.10.93:3128 no_proxy: localhost,127.0.0.1,webserver.hahmann-trier.local @@ -22,7 +21,6 @@ jobs: uses: actions/checkout@v4 - name: Tools installieren - # In Alpine nutzt man 'apk' statt 'apt-get' run: | apk add --no-cache rsync openssh-client @@ -31,15 +29,22 @@ jobs: - name: SSH vorbereiten run: | - mkdir -p ~/.ssh - echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - # Bekannte Hosts hinzufügen - echo "${{ secrets.KNOWN_HOSTS }}" > ~/.ssh/known_hosts + # Verzeichnis sicher erstellen + mkdir -p /root/.ssh + chmod 700 /root/.ssh + + # Key schreiben und sicherstellen, dass er mit einer neuen Zeile endet + echo "${{ secrets.DEPLOY_SSH_KEY }}" > /root/.ssh/id_ed25519 + chmod 600 /root/.ssh/id_ed25519 + + # Known Hosts schreiben + echo "${{ secrets.KNOWN_HOSTS }}" > /root/.ssh/known_hosts + chmod 644 /root/.ssh/known_hosts - name: Deploy via rsync run: | + # Wir nutzen den absoluten Pfad zum Key /root/.ssh/id_ed25519 rsync -avz --delete \ - -e "ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/id_ed25519" \ + -e "ssh -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new" \ public/ \ gitea-runner@webserver.hahmann-trier.local:/var/www/www-deepwatersurvival-de \ No newline at end of file