maj 2
Some checks failed
Build & Deploy to Hostverge FTP (Gitea Actions) / build-and-deploy (push) Failing after 56s

This commit is contained in:
streaper2
2026-09-27 20:11:49 +02:00
parent 257ed3a356
commit 0464de118f

View File

@@ -15,14 +15,8 @@ jobs:
env: env:
GITEA_TOKEN: ${{ gitea.token }} GITEA_TOKEN: ${{ gitea.token }}
run: | run: |
echo "=== 1. Forcer le routage IPv4 vers l'hôte Docker ===" echo "=== 1. Liaison locale 127.0.0.1 pour git.kaelstudio.tech ==="
# Récupération de l'IP passerelle via /proc/net/route (sans dépendance externe) echo "127.0.0.1 git.kaelstudio.tech" >> /etc/hosts
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 "=== 2. Configuration Git ===" echo "=== 2. Configuration Git ==="
git config --global http.sslVerify false git config --global http.sslVerify false
@@ -30,8 +24,11 @@ jobs:
echo "=== 3. Initialisation et Clonage ===" echo "=== 3. Initialisation et Clonage ==="
git init . git init .
git remote add origin "https://${GITEA_TOKEN}@git.kaelstudio.tech/${{ gitea.repository }}.git" || true # Tente via le domaine HTTPS (127.0.0.1:443 Nginx), et si besoin directement sur le port Gitea (127.0.0.1:6000)
git fetch --depth=1 origin "${{ gitea.ref_name || 'main' }}" 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 git checkout -f FETCH_HEAD
- name: 🟢 Setup Node.js 20 - name: 🟢 Setup Node.js 20