updated ci/cd
Some checks failed
Deployment / deploy-docker (push) Failing after 3s

This commit is contained in:
Melchior Reimers
2026-02-04 19:29:04 +01:00
parent 13e4795c80
commit 2ea2e9b0e6

View File

@@ -8,6 +8,25 @@ jobs:
deploy-docker:
runs-on: ubuntu-latest
steps:
- name: Validate deployment secrets
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
HETZNER_TOKEN: ${{ secrets.HETZNER_TOKEN }}
run: |
set -e
if [ -z "$SSH_PRIVATE_KEY" ]; then
echo "Missing SSH_PRIVATE_KEY secret"
exit 1
fi
if [ -z "$SSH_PUBLIC_KEY" ]; then
echo "Missing SSH_PUBLIC_KEY secret"
exit 1
fi
if [ -z "$HETZNER_TOKEN" ]; then
echo "Missing HETZNER_TOKEN secret"
exit 1
fi
- name: Deploy via SSH
uses: appleboy/ssh-action@v0.1.10
with:
@@ -15,7 +34,7 @@ jobs:
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
# Wir übergeben die Secrets als Environment-Variablen an den SSH-Befehl
envs: HETZNER_TOKEN
envs: HETZNER_TOKEN,SSH_KEY
script: |
set -e
cd /root/iac