ssh to maschine
Some checks failed
Build and Deploy Backend / build_and_deploy (push) Failing after 20s
Some checks failed
Build and Deploy Backend / build_and_deploy (push) Failing after 20s
This commit is contained in:
parent
62ab90515f
commit
ae89d8a5e0
1 changed files with 21 additions and 9 deletions
|
|
@ -48,16 +48,28 @@ jobs:
|
|||
--exclude '*.db' \
|
||||
backend/ /opt/blauwasser-api/backend/
|
||||
|
||||
- name: Abhängigkeiten aktualisieren
|
||||
- name: SSH konfigurieren
|
||||
run: |
|
||||
cd /opt/blauwasser-api/backend
|
||||
uv sync --frozen
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
openssh-client \
|
||||
ca-certificates
|
||||
|
||||
- name: Backend neu starten
|
||||
run: |
|
||||
systemctl restart blauwasser-api
|
||||
systemctl is-active --quiet blauwasser-api
|
||||
mkdir -p "$HOME/.ssh"
|
||||
chmod 700 "$HOME/.ssh"
|
||||
|
||||
- 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: |
|
||||
curl --fail https://api.blauwasser-mausis.de/health
|
||||
ssh blauwasser-api@host.docker.internal \
|
||||
'sudo /opt/blauwasser-api/deploy.sh'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue