CI/CD: Ajout workflows Gitea Actions (deploy-recette + deploy-prod)
This commit is contained in:
31
.gitea/workflows/deploy-prod.yml
Normal file
31
.gitea/workflows/deploy-prod.yml
Normal file
@@ -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"
|
||||||
31
.gitea/workflows/deploy-recette.yml
Normal file
31
.gitea/workflows/deploy-recette.yml
Normal file
@@ -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"
|
||||||
Reference in New Issue
Block a user