From b2431f1e16cc3c9b07804f661a2ee998c61f72d5 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Wed, 26 Aug 2026 15:42:00 +0200 Subject: [PATCH] =?UTF-8?q?Aktualisiere=20Umgebungsvariablen-Konfiguration?= =?UTF-8?q?=20f=C3=BCr=20das=20Produktions-Deployment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/DEPLOYMENT.md | 17 +++++++++-------- .gitea/workflows/deploy-production.yml | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.gitea/DEPLOYMENT.md b/.gitea/DEPLOYMENT.md index a851c3b..425707d 100644 --- a/.gitea/DEPLOYMENT.md +++ b/.gitea/DEPLOYMENT.md @@ -4,15 +4,16 @@ Der Workflow `workflows/deploy-production.yml` startet bei jedem Push auf `main` das Script `deploy-production.sh` im Produktions-Checkout `/var/www/timeclock`. -Einmalig im Gitea-Repository unter **Settings → Actions → Secrets** anlegen: +Einmalig im Gitea-Repository konfigurieren: -- `TIMECLOCK_DEPLOY_HOST`: Hostname des Produktionsservers, z. B. - `stechuhr3.tsschulz.de` -- `TIMECLOCK_DEPLOY_USER`: Linux-Benutzer mit Zugriff auf den Checkout und PM2 -- `TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY`: privater SSH-Schlüssel dieses Deploy- - Benutzers -- `TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS`: Ausgabe von - `ssh-keyscan -H stechuhr3.tsschulz.de` +- Unter **Settings → Actions → Variables**: + - `TIMECLOCK_DEPLOY_HOST`: Hostname des Produktionsservers + - `TIMECLOCK_DEPLOY_USER`: Linux-Benutzer mit Zugriff auf den Checkout und PM2 + - `TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS`: Ausgabe von + `ssh-keyscan -H ` +- Unter **Settings → Actions → Secrets**: + - `TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY`: privater SSH-Schlüssel dieses + Deploy-Benutzers Der öffentliche Teil des Deploy-Schlüssels muss auf dem Produktionsserver in `~/.ssh/authorized_keys` des Deploy-Benutzers hinterlegt sein. Der Gitea diff --git a/.gitea/workflows/deploy-production.yml b/.gitea/workflows/deploy-production.yml index 6b00a3b..0f211b9 100644 --- a/.gitea/workflows/deploy-production.yml +++ b/.gitea/workflows/deploy-production.yml @@ -11,10 +11,10 @@ jobs: steps: - name: Deploy auf stechuhr3 env: - DEPLOY_HOST: ${{ secrets.TIMECLOCK_DEPLOY_HOST }} - DEPLOY_USER: ${{ secrets.TIMECLOCK_DEPLOY_USER }} + DEPLOY_HOST: ${{ vars.TIMECLOCK_DEPLOY_HOST }} + DEPLOY_USER: ${{ vars.TIMECLOCK_DEPLOY_USER }} DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY }} - DEPLOY_SSH_KNOWN_HOSTS: ${{ secrets.TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS }} + DEPLOY_SSH_KNOWN_HOSTS: ${{ vars.TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS }} run: | set -eu