From edf926eeab10e1280dad2c1fadaaa994ecbe257e Mon Sep 17 00:00:00 2001 From: Serreau Jovann Date: Thu, 22 Jan 2026 21:18:40 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(.gitea/workflows):=20D=C3=A9pl?= =?UTF-8?q?ace=20la=20configuration=20de=20d=C3=A9ploiement=20et=20ajoute?= =?UTF-8?q?=20des=20d=C3=A9clencheurs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/install-deps.yml | 63 +++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/install-deps.yml b/.gitea/workflows/install-deps.yml index 2ad4c0a..2f2eb39 100644 --- a/.gitea/workflows/install-deps.yml +++ b/.gitea/workflows/install-deps.yml @@ -1,25 +1,48 @@ -deploy: - name: 🚀 Deploy to Production - runs-on: ubuntu-latest # N'oublie pas de prĂ©ciser l'OS du runner - steps: - - name: Deploy with SSH - uses: appleboy/ssh-action@v1.0.0 - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USER }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - port: 22 - script: | - cd /var/www/ludikevent-intranet +# Nom du workflow +name: Symfony CI - Install, Test, Build, Attest & Deploy - # 1. Activer la maintenance - php bin/console app:maintenance on +# DĂ©clencheurs du workflow +on: + push: + branches: + - master # Ou 'main' + pull_request: + types: [opened, synchronize, reopened] + branches: + - master # Ou 'main' - # 2. Mise Ă  jour du code - git pull +# Permissions nĂ©cessaires pour les actions utilisĂ©es +permissions: + contents: read + pull-requests: write + id-token: write + attestations: write + security-events: write # Requis pour Snyk pour poster les rĂ©sultats - # 3. ExĂ©cuter ton script d'update (migrations, install, etc.) - sh ./update.sh +jobs: + deploy: + name: 🚀 Deploy to Production + runs-on: ubuntu-latest # N'oublie pas de prĂ©ciser l'OS du runner + steps: + - name: Deploy with SSH + uses: appleboy/ssh-action@v1.0.0 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + port: 22 + script: | + cd /var/www/ludikevent-intranet - # 4. DĂ©sactiver la maintenance + + # 1. Activer la maintenance + php bin/console app:maintenance on + + # 2. Mise Ă  jour du code + git pull + + # 3. ExĂ©cuter ton script d'update (migrations, install, etc.) + sh ./update.sh + + # 4. DĂ©sactiver la maintenance php bin/console app:maintenance off