PR — Ouverture automatique / create-pr (push) Canceled after 0s
- GET /folders: allow listing children of intermediate folders leading to a shared descendant (canTraverse), filter children in application code since MariaDB forbids correlated recursive CTEs - Admin user deletion: shared folders are transferred to their best permission holder (admin > write > read, oldest); unshared folders are soft-deleted with their subtree; a shared child whose parent disappears is moved to root; permissions and stars of the deleted account are cleaned up - CI: label runners as [self-hosted, cohaise-cloud] to match the new dedicated gitea-runner
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: CD — Deployment
|
|
|
|
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, cohaise-cloud]
|
|
steps:
|
|
- name: Fetch latest code and rebuild
|
|
env:
|
|
# Repository path on the server. Set it through the DEPLOY_DIR
|
|
# secret when needed; otherwise the default below is used.
|
|
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
|
|
# Image builds compile and typecheck every workspace (tsc): no Node
|
|
# toolchain is required on the host.
|
|
docker compose build api migrate nginx
|
|
# Back up the database before a potentially destructive migration.
|
|
# Dumps land in ./backups on the host, never in the repository.
|
|
make backup
|
|
# Run migrations explicitly: the one-shot service must execute on
|
|
# every deploy, not only when its image happens to change.
|
|
docker compose run --rm migrate
|
|
make front
|
|
docker compose up -d api nginx
|
|
docker image prune -f
|