Fixed gitea CI config
All checks were successful
Tests et déploiement / validate (push) Successful in 47s
Tests et déploiement / deploy (push) Successful in 54s

This commit is contained in:
2026-10-04 19:29:02 +02:00
parent 75cdb4df9c
commit 7130ba5a12

View File

@@ -48,6 +48,12 @@ jobs:
SHA: ${{ gitea.sha }} SHA: ${{ gitea.sha }}
run: | run: |
set -eu set -eu
echo "Préparation de la connexion SSH"
: "${DEPLOY_HOST:?Secret DEPLOY_HOST absent ou vide}"
: "${DEPLOY_USER:?Secret DEPLOY_USER absent ou vide}"
: "${DEPLOY_SSH_KEY:?Secret DEPLOY_SSH_KEY absent ou vide}"
: "${DEPLOY_KNOWN_HOSTS:?Secret DEPLOY_KNOWN_HOSTS absent ou vide}"
: "${SHA:?SHA absent ou vide}"
umask 077 umask 077
mkdir -p "$HOME/.ssh" mkdir -p "$HOME/.ssh"
printf '%s\n' "$DEPLOY_SSH_KEY" > "$HOME/.ssh/deploy" printf '%s\n' "$DEPLOY_SSH_KEY" > "$HOME/.ssh/deploy"
@@ -63,4 +69,4 @@ jobs:
-o ConnectTimeout=10 \ -o ConnectTimeout=10 \
-o UserKnownHostsFile="$HOME/.ssh/known_hosts" \ -o UserKnownHostsFile="$HOME/.ssh/known_hosts" \
"$DEPLOY_USER@$DEPLOY_HOST" \ "$DEPLOY_USER@$DEPLOY_HOST" \
"bash /opt/pardis/deploy.sh '$SHA'" "echo SSH_OK; bash /opt/pardis/deploy.sh '$SHA'"