ssh to maschine
Some checks failed
Build and Deploy Backend / build_and_deploy (push) Failing after 20s

This commit is contained in:
ebby 2026-09-28 19:28:48 +02:00
parent 62ab90515f
commit ae89d8a5e0

View file

@ -48,16 +48,28 @@ jobs:
--exclude '*.db' \ --exclude '*.db' \
backend/ /opt/blauwasser-api/backend/ backend/ /opt/blauwasser-api/backend/
- name: Abhängigkeiten aktualisieren - name: SSH konfigurieren
run: | run: |
cd /opt/blauwasser-api/backend apt-get update
uv sync --frozen apt-get install -y --no-install-recommends \
openssh-client \
ca-certificates
- name: Backend neu starten mkdir -p "$HOME/.ssh"
run: | chmod 700 "$HOME/.ssh"
systemctl restart blauwasser-api
systemctl is-active --quiet blauwasser-api
- name: Deployment prüfen printf '%s\n' '${{ secrets.DEPLOY_SSH_KEY }}' \
> "$HOME/.ssh/id_ed25519"
chmod 600 "$HOME/.ssh/id_ed25519"
ssh-keyscan -H host.docker.internal \
>> "$HOME/.ssh/known_hosts"
chmod 644 "$HOME/.ssh/known_hosts"
- name: Host deployment ausführen
run: | run: |
curl --fail https://api.blauwasser-mausis.de/health ssh blauwasser-api@host.docker.internal \
'sudo /opt/blauwasser-api/deploy.sh'