Files
CoHaiSe-CLOUD/.github/workflows/deploy.yml
T
Esiah 4c2b58df00
PR — Ouverture automatique / create-pr (push) Successful in 2s
chore: host bind mounts for data and leaner deploy job
Store MariaDB and media data on the host disk via CLOUD_DB_DIR and CLOUD_MEDIA_DIR (default ../db, ../media) instead of Docker named volumes, so they live on the big disk and survive 'down -v'. Drop the host 'make check' from the deploy job: the image builds already run tsc for every workspace, so no Node toolchain is needed on the runner.
2026-10-16 10:53:44 +02:00

39 lines
1.0 KiB
YAML

name: CD — Déploiement
on:
push:
branches: [main]
paths:
- "backend/**"
- "frontend/**"
- "docker/**"
- "docker-compose.yml"
- "Makefile"
- ".github/workflows/deploy.yml"
workflow_dispatch:
concurrency:
group: deploy-cloud
cancel-in-progress: false
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Récupérer puis reconstruire
env:
# Chemin du dépôt sur le serveur. Défini via le secret DEPLOY_DIR si
# besoin ; sinon la valeur par défaut ci-dessous est utilisée.
DEPLOY_DIR: ${{ secrets.DEPLOY_DIR }}
run: |
set -eu
dir="${DEPLOY_DIR:-/srv/apps/cohaise-cloud/CoHaiSe-CLOUD}"
cd "$dir"
git pull --ff-only origin main
# Le build des images compile et typecheck chaque workspace (tsc) :
# aucune toolchain Node n'est requise sur l'hote.
docker compose build api nginx
make front
docker compose up -d api nginx
docker image prune -f