fixed deploy
Some checks failed
Deploy SingleChat / deploy (push) Failing after 2s

This commit is contained in:
Torsten Schulz (local)
2026-06-15 16:28:09 +02:00
parent 8d7c7d6f2a
commit f6e0b95a1f
3 changed files with 12 additions and 14 deletions

View File

@@ -10,10 +10,9 @@ jobs:
runs-on: ubuntu-latest
env:
SSH_HOST: ${{ vars.PROD_HOST }}
SSH_PORT: ${{ vars.PROD_PORT }}
SSH_USER: ${{ vars.PROD_USER }}
DEPLOY_SCRIPT: ${{ vars.PROD_DEPLOY_SCRIPT }}
SSH_HOST: ${{ vars.SSH_HOST }}
SSH_PORT: ${{ vars.SSH_PORT }}
SSH_USER: ${{ vars.SSH_USER }}
steps:
- name: Show resolved non-secret config
@@ -21,7 +20,10 @@ jobs:
echo "SSH_HOST=$SSH_HOST"
echo "SSH_PORT=$SSH_PORT"
echo "SSH_USER=$SSH_USER"
echo "DEPLOY_SCRIPT=${DEPLOY_SCRIPT:-/usr/local/bin/actualize-singlechat.sh}"
test -n "$SSH_HOST"
test -n "$SSH_PORT"
test -n "$SSH_USER"
echo "DEPLOY_SCRIPT=/usr/local/bin/actualize-singlechat.sh"
- name: Prepare SSH
run: |
@@ -29,7 +31,6 @@ jobs:
mkdir -p ~/.ssh
printf '%s' "${{ secrets.PROD_SSH_KEY_B64 }}" | base64 -d > ~/.ssh/id_deploy
chmod 600 ~/.ssh/id_deploy
ssh-keygen -l -f ~/.ssh/id_deploy
ssh-keyscan -p "$SSH_PORT" "$SSH_HOST" >> ~/.ssh/known_hosts
- name: Test SSH connection
@@ -46,11 +47,10 @@ jobs:
- name: Run deployment script
run: |
set -e
script="${DEPLOY_SCRIPT:-/usr/local/bin/actualize-singlechat.sh}"
ssh -i ~/.ssh/id_deploy \
-o StrictHostKeyChecking=no \
-o BatchMode=yes \
-o ConnectTimeout=10 \
-p "$SSH_PORT" \
"$SSH_USER@$SSH_HOST" \
"$script"
"/usr/local/bin/actualize-singlechat.sh"

View File

@@ -59,8 +59,7 @@ Der Workflow `.gitea/workflows/deploy.yml` startet bei Push auf `main` per SSH d
Gitea-Konfiguration:
- Variables: `PROD_HOST`, `PROD_PORT`, `PROD_USER`
- Optional: `PROD_DEPLOY_SCRIPT`, falls der Skriptpfad abweicht
- Variables: `SSH_HOST`, `SSH_PORT`, `SSH_USER`
- Secret: `PROD_SSH_KEY_B64` mit dem base64-kodierten privaten Deploy-Key
Server-Skript installieren:

View File

@@ -106,10 +106,9 @@ Der Workflow `.gitea/workflows/deploy.yml` deployt bei jedem Push auf `main` per
In Gitea müssen dafür gesetzt sein:
- Repository Variables:
- `PROD_HOST`: Produktionsserver, z.B. `tsschulz.de`
- `PROD_PORT`: SSH-Port, z.B. `2222`
- `PROD_USER`: SSH-User für den Deploy
- `PROD_DEPLOY_SCRIPT`: optional, Standard ist `/usr/local/bin/actualize-singlechat.sh`
- `SSH_HOST`: Produktionsserver, z.B. `rv2756.1blu.de`
- `SSH_PORT`: SSH-Port, z.B. `22`
- `SSH_USER`: SSH-User für den Deploy
- Repository Secret:
- `PROD_SSH_KEY_B64`: privater SSH-Key base64-kodiert