feat: restructure to kai-sa-cam layout with apps/ structure
CD — Kai-Sa-Cam Deployment / deploy (push) Canceled after 0s
CD — Kai-Sa-Cam Deployment / deploy (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
name: CD — Kai-Sa-Cam Deployment
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "apps/kai-sa-cam/**"
|
||||
- "config/kai-sa-go2rtc.yaml"
|
||||
- "docker-compose.yml"
|
||||
- "Makefile"
|
||||
- ".github/workflows/deploy.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: deploy-kai-sa-cam
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: [self-hosted, 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
|
||||
docker compose --profile prod up -d
|
||||
docker image prune -f
|
||||
Reference in New Issue
Block a user