From 1fccb93ac1ef46f67d05dba2357833b240dd5860 Mon Sep 17 00:00:00 2001 From: Xavier Date: Mon, 5 Oct 2026 19:10:15 +0200 Subject: [PATCH] test --- .gitea/workflows/deploy.yml | 23 +++++++++++++++++++++++ main.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e69de29..be1f6f8 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,23 @@ +name: Deploiement Automatique Aethas38 +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: self-hosted + steps: + - name: Checkout du code + uses: actions/checkout@v4 + + - name: Synchronisation sur le serveur et redémarrage Dockge + run: | + # Se place dans le dossier de votre stack sur le serveur + cd /opt/stacks/codage + + # Force la mise à jour des fichiers depuis Gitea + git pull origin main + + # Relance le conteneur pour appliquer immédiatement le nouveau code + docker compose restart aethas38-core \ No newline at end of file diff --git a/main.py b/main.py index c3400f6..2c6fe25 100644 --- a/main.py +++ b/main.py @@ -132,7 +132,7 @@ def get(session): @rt('/check_updates') def get(): try: - res = requests.get("https://api.github.com/repos/Reivax69008/Aethas-Multi-IA/commits/main", timeout=3).json() + res = requests.get("https://gitea.aethas38.duckdns.org/xavier/MULTI-IA-CODAGE/git/commits/main", timeout=3).json() remote_commit = res.get("sha", "") local_commit = "" if os.path.exists(".git/refs/heads/main"):