fix(ci): target pavillon80.changeip.org:444 instead of 192.168.1.117
Some checks failed
deploy / deploy (push) Failing after 0s

This commit is contained in:
Mathis 2026-10-04 16:48:30 +02:00
parent 5d9baee102
commit 3ea90d7078

View file

@ -3,7 +3,7 @@
# #
# Declencheur : push sur `main`. # Declencheur : push sur `main`.
# Runner : forgejo-runner self-hosted (label omhk-deploy, sur .22). # Runner : forgejo-runner self-hosted (label omhk-deploy, sur .22).
# Cible : 192.168.1.117 -> conteneur Docker `vision-bot` # Cible : pavillon80.changeip.org:444 -> conteneur Docker `vision-bot`
# (/home/discord/Bots/VisionApp, bind-mount .:/app). # (/home/discord/Bots/VisionApp, bind-mount .:/app).
# #
# Pipeline : syntaxe -> rsync -> deploy -> health check -> rollback auto. # Pipeline : syntaxe -> rsync -> deploy -> health check -> rollback auto.
@ -42,7 +42,7 @@ jobs:
chmod 700 ~/.ssh chmod 700 ~/.ssh
printf '%s\n' "$VISION_SSH_KEY" > ~/.ssh/id_vision printf '%s\n' "$VISION_SSH_KEY" > ~/.ssh/id_vision
chmod 600 ~/.ssh/id_vision chmod 600 ~/.ssh/id_vision
ssh-keyscan -H 192.168.1.117 >> ~/.ssh/known_hosts 2>/dev/null ssh-keyscan -H -p 444 pavillon80.changeip.org >> ~/.ssh/known_hosts 2>/dev/null
shell: bash shell: bash
# ═══ TEST SYNTAXE (sur .22, rapide) ══════════════════════════════ # ═══ TEST SYNTAXE (sur .22, rapide) ══════════════════════════════
@ -89,13 +89,13 @@ jobs:
--exclude '__pycache__/' --exclude 'venv/' --exclude '.venv/' \ --exclude '__pycache__/' --exclude 'venv/' --exclude '.venv/' \
--exclude '*.db' --exclude '*.db-journal' --exclude '*.db-wal' --exclude '*.db-shm' \ --exclude '*.db' --exclude '*.db-journal' --exclude '*.db-wal' --exclude '*.db-shm' \
--exclude '.vscode/' --exclude '.idea/' \ --exclude '.vscode/' --exclude '.idea/' \
-e "ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts" \ -e "ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts -p 444" \
. \ . \
discord@192.168.1.117:/home/discord/Bots/VisionApp/ discord@pavillon80.changeip.org:/home/discord/Bots/VisionApp/
shell: bash shell: bash
# ═══ DEPLOY ═══════════════════════════════════════════════════════ # ═══ DEPLOY ═══════════════════════════════════════════════════════
- name: Deploiement du conteneur (docker compose, cote .117) - name: Deploiement du conteneur (docker compose, cote pavillon80)
run: | run: |
set -euo pipefail set -euo pipefail
cd repo cd repo
@ -105,8 +105,8 @@ jobs:
if echo "$CHANGED" | grep -qE '(^|/)(requirements\.txt|Dockerfile)$'; then if echo "$CHANGED" | grep -qE '(^|/)(requirements\.txt|Dockerfile)$'; then
REBUILD="true" REBUILD="true"
fi fi
ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts \ ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts -p 444 \
discord@192.168.1.117 \ discord@pavillon80.changeip.org \
"bash /home/discord/Bots/VisionApp/scripts/deploy_runner.sh main '${COMMIT}' '${REBUILD}'" "bash /home/discord/Bots/VisionApp/scripts/deploy_runner.sh main '${COMMIT}' '${REBUILD}'"
shell: bash shell: bash
@ -118,7 +118,7 @@ jobs:
echo "Attente du demarrage du bot..." echo "Attente du demarrage du bot..."
for i in $(seq 1 10); do for i in $(seq 1 10); do
sleep 3 sleep 3
STATUS=$(curl -s -m 5 http://192.168.1.117:1890/health 2>/dev/null || echo "") STATUS=$(curl -s -m 5 http://pavillon80.changeip.org:1890/health 2>/dev/null || echo "")
if echo "$STATUS" | grep -q '"status":"ok"'; then if echo "$STATUS" | grep -q '"status":"ok"'; then
echo "Health check OK (tentative $i)" echo "Health check OK (tentative $i)"
exit 0 exit 0
@ -147,11 +147,11 @@ jobs:
--exclude '__pycache__/' --exclude 'venv/' --exclude '.venv/' \ --exclude '__pycache__/' --exclude 'venv/' --exclude '.venv/' \
--exclude '*.db' --exclude '*.db-journal' --exclude '*.db-wal' --exclude '*.db-shm' \ --exclude '*.db' --exclude '*.db-journal' --exclude '*.db-wal' --exclude '*.db-shm' \
--exclude '.vscode/' --exclude '.idea/' \ --exclude '.vscode/' --exclude '.idea/' \
-e "ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts" \ -e "ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts -p 444" \
. \ . \
discord@192.168.1.117:/home/discord/Bots/VisionApp/ discord@pavillon80.changeip.org:/home/discord/Bots/VisionApp/
ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts \ ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts -p 444 \
discord@192.168.1.117 \ discord@pavillon80.changeip.org \
"bash /home/discord/Bots/VisionApp/scripts/deploy_runner.sh main '${PREV_COMMIT}' false" "bash /home/discord/Bots/VisionApp/scripts/deploy_runner.sh main '${PREV_COMMIT}' false"
echo "ROLLBACK termine" echo "ROLLBACK termine"
exit 1 exit 1
@ -160,7 +160,7 @@ jobs:
- name: Verification finale - name: Verification finale
run: | run: |
set -euo pipefail set -euo pipefail
ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts \ ssh -i ~/.ssh/id_vision -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts -p 444 \
discord@192.168.1.117 \ discord@pavillon80.changeip.org \
"docker ps --filter name=vision-bot --format '{{.Names}} {{.Status}}' && curl -s -m 5 http://localhost:1890/health && echo" "docker ps --filter name=vision-bot --format '{{.Names}} {{.Status}}' && curl -s -m 5 http://localhost:1890/health && echo"
shell: bash shell: bash