CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 9s
- move sources, Dockerfile and build config (src, public, package.json, vite/tailwind/postcss/tsconfig, index.html) to the repo root - docker-compose: build context is now "." instead of ./apps/kai-sa-cam - add a .dockerignore (node_modules, dist, media, config, .env, ...) so the larger build context does not ship media, secrets or local node_modules into the image - deploy workflow: replace the apps/kai-sa-cam/** paths filter with paths-ignore so pushes keep triggering deployments - remove the Renovate workflow
31 lines
763 B
YAML
31 lines
763 B
YAML
name: CD — Kai-Sa-Cam Deployment
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "renovate.json"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: deploy-kai-sa-cam
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: [kai-sa-cam]
|
|
steps:
|
|
- name: Fetch latest code and rebuild
|
|
env:
|
|
DEPLOY_DIR: ${{ secrets.DEPLOY_DIR }}
|
|
run: |
|
|
set -eu
|
|
dir="${DEPLOY_DIR:-/srv/apps/kai-sa-cam}"
|
|
git config --global --add safe.directory "$dir"
|
|
cd "$dir"
|
|
git pull --ff-only origin main
|
|
docker compose --profile prod build --progress=plain
|
|
docker compose --profile prod up -d --force-recreate kai-sa-go2rtc kai-sa-cam
|
|
docker image prune -f
|