This commit is contained in:
1 parent
a93df8b54d
commit
1fccb93ac1
2 files changed
+24
-1
No files matched your search
@@ -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
|
||||||
@@ -132,7 +132,7 @@ def get(session):
|
|||||||
@rt('/check_updates')
|
@rt('/check_updates')
|
||||||
def get():
|
def get():
|
||||||
try:
|
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", "")
|
remote_commit = res.get("sha", "")
|
||||||
local_commit = ""
|
local_commit = ""
|
||||||
if os.path.exists(".git/refs/heads/main"):
|
if os.path.exists(".git/refs/heads/main"):
|
||||||
|
|||||||
Reference in new issue
Block a user