From 4a3b0dcc838813f38ef8285f0808765b057530ee Mon Sep 17 00:00:00 2001 From: Kerboul Date: Thu, 24 Oct 2024 15:51:49 +0200 Subject: [PATCH] Ajout CI/CD --- .gitea/workflows/test.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..ea41dfb --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,26 @@ +name: Déploiement du site + +on: + push: + branches: + - main + +jobs: + site-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Test SSH connection + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + password: ${{ secrets.SSH_PASSWORD }} + script: | + echo "CONNEXION REUSSIE" + echo "Envoi de la commande de déploiement via SSH" + ssh mikoshi "cd /home/timelapse/nginx && git pull origin main && docker restart timelapse-frontend" + echo "Commande envoyée avec succès" \ No newline at end of file