chore: initial import of CoHaiSe Cloud
PR — Ouverture automatique / create-pr (push) Failing after 1s

Standalone files & media application: React/Vite frontend with the @cohaise/ui design system, Hono + MariaDB backend, nginx reverse proxy, Docker Compose stack, migrations 000-006, and project docs.

Adds Gitea Actions workflows for deployment, automatic pull requests, and Renovate dependency updates.
This commit is contained in:
2026-10-14 15:24:06 +02:00
commit cc397e96d8
113 changed files with 12678 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
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
make check
make front
docker compose build api nginx
docker compose up -d api nginx
docker image prune -f
+49
View File
@@ -0,0 +1,49 @@
name: PR — Ouverture automatique
on:
push:
branches-ignore: [main]
jobs:
create-pr:
runs-on: self-hosted
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ouvrir (ou vérifier) la pull request
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API: ${{ github.server_url }}/api/v1
REPO: ${{ github.repository }}
BRANCH: ${{ github.ref_name }}
run: |
set -eu
title=$(git log -1 --pretty=%s)
body=$(git log -1 --pretty=%b)
[ -n "$body" ] || body="PR automatique de $BRANCH vers main."
open=$(curl -fsS -H "Authorization: token $GITEA_TOKEN" \
"$API/repos/$REPO/pulls?state=open&limit=50" \
| python3 -c 'import json,os,sys; b=os.environ["BRANCH"]; print(sum(1 for p in json.load(sys.stdin) if p.get("head", {}).get("ref") == b))')
if [ "$open" -gt 0 ]; then
echo "Une PR est déjà ouverte pour $BRANCH."
exit 0
fi
python3 - "$BRANCH" "$title" "$body" <<'PY' > /tmp/pr.json
import json, sys
branch, title, body = sys.argv[1], sys.argv[2], sys.argv[3]
print(json.dumps({"base": "main", "head": branch, "title": title, "body": body}))
PY
curl -fsS -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
--data @/tmp/pr.json \
"$API/repos/$REPO/pulls"
echo "PR créée."
+33
View File
@@ -0,0 +1,33 @@
name: Renovate
on:
schedule:
- cron: "0 4 * * 1"
workflow_dispatch:
concurrency:
group: renovate
cancel-in-progress: false
jobs:
renovate:
runs-on: self-hosted
steps:
- name: Mettre à jour les dépendances
env:
RENOVATE_PLATFORM: gitea
RENOVATE_ENDPOINT: ${{ github.server_url }}
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
RENOVATE_REPOSITORIES: ${{ github.repository }}
run: |
set -eu
mkdir -p /srv/apps/cohaise-cloud/renovate-cache
docker run --rm \
-e RENOVATE_PLATFORM \
-e RENOVATE_ENDPOINT \
-e RENOVATE_TOKEN \
-e RENOVATE_REPOSITORIES \
-e RENOVATE_ONBOARDING=false \
-e LOG_LEVEL=info \
-v /srv/apps/cohaise-cloud/renovate-cache:/tmp/renovate \
ghcr.io/renovatebot/renovate:latest