From 53eb3983f7f2463b4cf4ae6298955dbde196305a Mon Sep 17 00:00:00 2001 From: Nebulae Date: Sun, 21 Dec 2025 13:35:09 +0100 Subject: [PATCH] fix(deploy-preprod file) --- .gitea/workflows/deploy-preprod.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-preprod.yml b/.gitea/workflows/deploy-preprod.yml index eb33bb3..e678dfd 100644 --- a/.gitea/workflows/deploy-preprod.yml +++ b/.gitea/workflows/deploy-preprod.yml @@ -55,11 +55,15 @@ jobs: ssh -6 -o StrictHostKeyChecking=yes \ -p "$SSH_PORT" \ - "$SSH_USER@$SSH_HOST_SSH" <<'EOF' + "$SSH_USER@$SSH_HOST_SSH" bash -s <<'EOF' "$PREPROD_PATH" "$GIT_REPO" set -e + PREPROD_PATH="$1" + GIT_REPO="$2" + + # Vérifier si le dépôt existe, sinon le cloner if [ ! -d "$PREPROD_PATH/.git" ]; then - echo "Repository not found. Cloning..." + echo "Repository not found. Cloning from $GIT_REPO..." mkdir -p "$(dirname "$PREPROD_PATH")" git clone "$GIT_REPO" "$PREPROD_PATH" cd "$PREPROD_PATH"