From f6aa445732e5a4e71445958e633dc7fe547285ad Mon Sep 17 00:00:00 2001 From: Manus Date: Fri, 10 Jul 2026 21:37:47 -0400 Subject: [PATCH] CI/CD: Ajout workflows Gitea Actions (deploy-recette + deploy-prod) --- .gitea/workflows/deploy-prod.yml | 31 +++++++++++++++++++++++++++++ .gitea/workflows/deploy-recette.yml | 31 +++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .gitea/workflows/deploy-prod.yml create mode 100644 .gitea/workflows/deploy-recette.yml diff --git a/.gitea/workflows/deploy-prod.yml b/.gitea/workflows/deploy-prod.yml new file mode 100644 index 0000000..57f13a4 --- /dev/null +++ b/.gitea/workflows/deploy-prod.yml @@ -0,0 +1,31 @@ +name: Deploy Production + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Deploy on production server + run: | + cd /opt/manus-deploy/apps/veille-reglementaire + git pull origin main + docker compose -f docker-compose.prod.yml up -d --build + echo "✅ Déploiement production terminé" + + - name: Health check + run: | + sleep 30 + STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://veille.santinova-soft.org) + echo "HTTP status: $STATUS" + if [ "$STATUS" != "200" ]; then + echo "❌ Health check failed (HTTP $STATUS)" + exit 1 + fi + echo "✅ Health check OK" diff --git a/.gitea/workflows/deploy-recette.yml b/.gitea/workflows/deploy-recette.yml new file mode 100644 index 0000000..f527f2d --- /dev/null +++ b/.gitea/workflows/deploy-recette.yml @@ -0,0 +1,31 @@ +name: Deploy Recette + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Deploy on recette server + run: | + cd /opt/manus-deploy/apps/veille-reglementaire + git pull origin main + docker compose -f docker-compose.recette.yml up -d --build + echo "✅ Déploiement recette terminé" + + - name: Health check + run: | + sleep 30 + STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://veille.recette.santinova-soft.org) + echo "HTTP status: $STATUS" + if [ "$STATUS" != "200" ]; then + echo "❌ Health check failed (HTTP $STATUS)" + exit 1 + fi + echo "✅ Health check OK"