From faf526401540fc238b57ec795e48cb898124a547 Mon Sep 17 00:00:00 2001 From: anto Date: Wed, 8 Jan 2025 14:20:22 +0100 Subject: [PATCH] ajout style --- .gitea/workflows/deploy.yml | 94 ++++++++++++++++++------------------- html/projet_detail.html | 12 ++--- html/videos.html | 2 +- index.html | 4 +- js/projet_detail.js | 14 +++--- 5 files changed, 63 insertions(+), 63 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 16b7a9f..3faf0ea 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,48 +1,48 @@ -# Le fichier .gitea-ci.yml pour Gitea CI/CD - -on: - push: - branches: - - main # Déclenche l'action pour la branche principale - -jobs: - - deployment: - runs-on: ubuntu-latest - steps: - # Étape 1: Setup SSH - - name: Setup SSH and Add Private Key - run: | - # Créez un dossier pour stocker les clés SSH - mkdir -p ~/.ssh - - # Ajoutez la clé privée stockée dans le secret à un fichier id_rsa - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - - # Protéger les permissions du fichier de la clé privée - chmod 600 ~/.ssh/id_rsa - - # Ajoutez l'hôte distant à known_hosts pour éviter les erreurs de vérification de l'host - ssh-keyscan -H 192.168.1.87 >> ~/.ssh/known_hosts - - # Vérifiez les permissions du fichier id_rsa (optionnel, juste pour être sûr) - ls -l ~/.ssh/id_rsa - - # Étape 2: Test SSH Connection - - name: Test SSH connection - run: | - # Testez la connexion SSH avec l'hôte distant - ssh -v kerboul@192.168.1.87 "echo 'Connection successful!'" - - # Étape 3: Ajouter une action qui utilise la connexion SSH - - name: Run remote command - run: | - # Exemple de commande distante exécutée sur le serveur distant via SSH - ssh kerboul@192.168.1.87 "cd /home/kerboul/scripts/timelapse && ./update_timelapse.sh -o" - - # Étape 4: Nettoyage (optionnel) - - name: Clean up SSH keys - run: | - # Supprimer la clé privée pour des raisons de sécurité (optionnel) - rm -f ~/.ssh/id_rsa +# Le fichier .gitea-ci.yml pour Gitea CI/CD + +on: + push: + branches: + - main # Déclenche l'action pour la branche principale + +jobs: + + deployment: + runs-on: ubuntu-latest + steps: + # Étape 1: Setup SSH + - name: Setup SSH and Add Private Key + run: | + # Créez un dossier pour stocker les clés SSH + mkdir -p ~/.ssh + + # Ajoutez la clé privée stockée dans le secret à un fichier id_rsa + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + + # Protéger les permissions du fichier de la clé privée + chmod 600 ~/.ssh/id_rsa + + # Ajoutez l'hôte distant à known_hosts pour éviter les erreurs de vérification de l'host + ssh-keyscan -H 192.168.1.87 >> ~/.ssh/known_hosts + + # Vérifiez les permissions du fichier id_rsa (optionnel, juste pour être sûr) + ls -l ~/.ssh/id_rsa + + # Étape 2: Test SSH Connection + - name: Test SSH connection + run: | + # Testez la connexion SSH avec l'hôte distant + ssh -v kerboul@192.168.1.87 "echo 'Connection successful!'" + + # Étape 3: Ajouter une action qui utilise la connexion SSH + - name: Run remote command + run: | + # Exemple de commande distante exécutée sur le serveur distant via SSH + ssh kerboul@192.168.1.87 "cd /home/kerboul/scripts/timelapse && ./update_timelapse.sh -o" + + # Étape 4: Nettoyage (optionnel) + - name: Clean up SSH keys + run: | + # Supprimer la clé privée pour des raisons de sécurité (optionnel) + rm -f ~/.ssh/id_rsa rm -f ~/.ssh/known_hosts \ No newline at end of file diff --git a/html/projet_detail.html b/html/projet_detail.html index cc2c5ae..2ebe6ac 100644 --- a/html/projet_detail.html +++ b/html/projet_detail.html @@ -21,7 +21,7 @@
-
@@ -48,20 +48,20 @@
- + - - diff --git a/html/videos.html b/html/videos.html index a0abdc2..ce38b89 100644 --- a/html/videos.html +++ b/html/videos.html @@ -13,7 +13,7 @@
- diff --git a/index.html b/index.html index 8f61970..9a415c1 100644 --- a/index.html +++ b/index.html @@ -14,8 +14,8 @@
- - + +
diff --git a/js/projet_detail.js b/js/projet_detail.js index a2fdc13..86b1f0f 100644 --- a/js/projet_detail.js +++ b/js/projet_detail.js @@ -18,13 +18,13 @@ function display_metrics(metrics_datas) { document.addEventListener("DOMContentLoaded", () => { const urlParams = new URLSearchParams(window.location.search); const projectId = urlParams.get("id"); - getDataProjectMetricsFromApi(projectId) - .then((project_metrics) => { - display_metrics(project_metrics); - }) - .catch((error) => { - console.error(error); - }); + // getDataProjectMetricsFromApi(projectId) + // .then((project_metrics) => { + // display_metrics(project_metrics); + // }) + // .catch((error) => { + // console.error(error); + // }); document.getElementById("projets").addEventListener("click", () => { window.location.href = "../index.html"; current_project = "";