From 4f43d18d9afcaad831eb0139494d2ac41afe6ed6 Mon Sep 17 00:00:00 2001 From: Serreau Jovann Date: Wed, 28 Jan 2026 16:13:06 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(.gitea/workflows):=20Transform?= =?UTF-8?q?e=20le=20workflow=20en=20d=C3=A9ploiement=20continu=20planifi?= =?UTF-8?q?=C3=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/install-deps.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/install-deps.yml b/.gitea/workflows/install-deps.yml index e57d958..840eb48 100644 --- a/.gitea/workflows/install-deps.yml +++ b/.gitea/workflows/install-deps.yml @@ -1,28 +1,24 @@ -# Nom du workflow -name: Symfony CI - Install, Test, Build, Attest & Deploy +name: Symfony CD - Scheduled Deploy -# Déclencheurs du workflow on: push: branches: - - master # Ou 'main' - pull_request: - types: [opened, synchronize, reopened] - branches: - - master # Ou 'main' + - master + schedule: + # Déclenchement à 2h00 UTC + - cron: '0 2 * * *' + workflow_dispatch: # Bouton manuel dans GitHub Actions -# 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 jobs: deploy: name: 🚀 Deploy to Production - runs-on: ubuntu-latest # N'oublie pas de préciser l'OS du runner + # Ne s'exécute QUE sur le cron ou le bouton manuel (exclut le push automatique) + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest steps: - name: Deploy with SSH uses: appleboy/ssh-action@v1.0.0 @@ -32,4 +28,4 @@ jobs: key: ${{ secrets.SSH_PRIVATE_KEY }} port: 22 script: | - cd /var/www/ludikevent-intranet && sudo update-alternatives --set php /usr/bin/php8.4 && php bin/console app:maintenance on && git pull && sh ./update.sh && php bin/console app:maintenance off && php bin/console app:purge-cloudflare && sudo update-alternatives --set php /usr/bin/php8.3 + cd /var/www/ludikevent-intranet && sudo update-alternatives --set php /usr/bin/php8.4 && php bin/console app:maintenance on && git pull origin master && sh ./update.sh && php bin/console app:maintenance off && php bin/console app:purge-cloudflare && sudo update-alternatives --set php /usr/bin/php8.3