From 0464de118f8205c1578ef9953f5994a57fe0f452 Mon Sep 17 00:00:00 2001 From: streaper2 Date: Sun, 27 Sep 2026 20:11:49 +0200 Subject: [PATCH] maj 2 --- .gitea/workflows/deploy.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d6d003a..a21b8b8 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -15,14 +15,8 @@ jobs: env: GITEA_TOKEN: ${{ gitea.token }} run: | - echo "=== 1. Forcer le routage IPv4 vers l'hôte Docker ===" - # Récupération de l'IP passerelle via /proc/net/route (sans dépendance externe) - HOST_IP=$(awk '$2 == "00000000" { printf("%d.%d.%d.%d\n", "0x" substr($3,7,2), "0x" substr($3,5,2), "0x" substr($3,3,2), "0x" substr($3,1,2)) }' /proc/net/route 2>/dev/null || echo "172.17.0.1") - [ -z "$HOST_IP" ] && HOST_IP="172.17.0.1" - echo "IP de l'hôte Docker détectée : $HOST_IP" - - # Injecter l'IP de l'hôte pour git.kaelstudio.tech dans /etc/hosts - echo "$HOST_IP git.kaelstudio.tech" >> /etc/hosts + echo "=== 1. Liaison locale 127.0.0.1 pour git.kaelstudio.tech ===" + echo "127.0.0.1 git.kaelstudio.tech" >> /etc/hosts echo "=== 2. Configuration Git ===" git config --global http.sslVerify false @@ -30,8 +24,11 @@ jobs: echo "=== 3. Initialisation et Clonage ===" git init . - git remote add origin "https://${GITEA_TOKEN}@git.kaelstudio.tech/${{ gitea.repository }}.git" || true - git fetch --depth=1 origin "${{ gitea.ref_name || 'main' }}" + # Tente via le domaine HTTPS (127.0.0.1:443 Nginx), et si besoin directement sur le port Gitea (127.0.0.1:6000) + if ! git fetch --depth=1 "https://${GITEA_TOKEN}@git.kaelstudio.tech/${{ gitea.repository }}.git" "${{ gitea.ref_name || 'main' }}"; then + echo "Fallback vers connexion directe port 6000..." + git fetch --depth=1 "http://${GITEA_TOKEN}@127.0.0.1:6000/${{ gitea.repository }}.git" "${{ gitea.ref_name || 'main' }}" + fi git checkout -f FETCH_HEAD - name: 🟢 Setup Node.js 20