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 @@
|
- |
- |
- |
|---|