From dd6a09cd84045380ca87223c9b49813d292cd8b5 Mon Sep 17 00:00:00 2001 From: Lucas Hahmann Date: Tue, 19 May 2026 09:59:04 +0200 Subject: [PATCH] Add dependencys --- .gitea/workflows/deploy.yml | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f344f5a..1bde4a4 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -8,42 +8,32 @@ on: jobs: deploy: runs-on: ubuntu-24.04 - # We don't use 'container:' at the top level to avoid entrypoint issues + container: + image: klakegg/hugo:ext-alpine # Wir bleiben bei Alpine steps: - name: Checkout uses: actions/checkout@v4 - with: - submodules: true # Hugo sites often have theme submodules - fetch-depth: 0 # Hugo needs history for .Lastmod - - name: Setup Hugo - uses: peaceiris/actions-hugo@v3 - with: - hugo-version: 'latest' - extended: true + - name: Tools installieren + # In Alpine nutzt man 'apk' statt 'apt-get' + run: | + apk add --no-cache rsync openssh-client - name: Hugo Build run: hugo --minify - - name: Install SSH and Rsync - run: | - sudo apt-get update - sudo apt-get install -y rsync openssh-client - - name: SSH vorbereiten run: | mkdir -p ~/.ssh echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 - # Scan the host key to avoid interactive prompts - ssh-keyscan -H webserver.hahmann-trier.local >> ~/.ssh/known_hosts - # If ssh-keyscan fails because of your local network, - # ensure secrets.KNOWN_HOSTS is correctly set instead. + # Bekannte Hosts hinzufügen + echo "${{ secrets.KNOWN_HOSTS }}" > ~/.ssh/known_hosts - name: Deploy via rsync run: | rsync -avz --delete \ - -e "ssh -o StrictHostKeyChecking=accept-new" \ + -e "ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/id_ed25519" \ public/ \ gitea-runner@webserver.hahmann-trier.local:/var/www/www-deepwatersurvival-de \ No newline at end of file