Aktualisiere Produktions-Deployment-Workflow zur Verwendung von Git Fast-Forward vor dem Ausführen des Deploy-Skripts
Some checks failed
Deploy production / deploy (push) Failing after 1s
Some checks failed
Deploy production / deploy (push) Failing after 1s
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
# Automatisches Produktions-Deployment
|
# Automatisches Produktions-Deployment
|
||||||
|
|
||||||
Der Workflow `workflows/deploy-production.yml` startet bei jedem Push auf
|
Der Workflow `workflows/deploy-production.yml` aktualisiert bei jedem Push auf
|
||||||
`main` das Script `deploy-production.sh` im Produktions-Checkout
|
`main` zunächst den Produktions-Checkout `/var/www/timeclock` per
|
||||||
`/var/www/timeclock`.
|
Fast-forward und startet dann `deploy-production.sh`.
|
||||||
|
|
||||||
Einmalig im Gitea-Repository konfigurieren:
|
Einmalig im Gitea-Repository konfigurieren:
|
||||||
|
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ jobs:
|
|||||||
echo "known_hosts-Zeilen: $(wc -l < "$HOME/.ssh/known_hosts")"
|
echo "known_hosts-Zeilen: $(wc -l < "$HOME/.ssh/known_hosts")"
|
||||||
|
|
||||||
ssh -o BatchMode=yes "$DEPLOY_USER@$DEPLOY_HOST" \
|
ssh -o BatchMode=yes "$DEPLOY_USER@$DEPLOY_HOST" \
|
||||||
'cd /var/www/timeclock && ./deploy-production.sh'
|
'cd /var/www/timeclock && git pull --ff-only origin main && ./deploy-production.sh'
|
||||||
|
|||||||
Reference in New Issue
Block a user