Kairo-Jinkendo/.gitea/workflows/deploy-prod.yml
Lars b1e00bb347
All checks were successful
Deploy Development / deploy (push) Successful in 45s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / pytest-backend (push) Has been skipped
Test Suite / lint-backend (push) Successful in 2s
Test Suite / build-frontend (push) Successful in 44s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
CI-Fix: compose-smoke nicht bei Push (Port-Konflikt mit Deploy), DB ohne Host-Port.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 19:35:09 +02:00

36 lines
1.2 KiB
YAML

name: Deploy Production
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to Production
run: |
set -e
echo "=== Deploying Kairo to PRODUCTION ==="
REPO="http://192.168.2.144:3000/Lars/Kairo-Jinkendo.git"
TARGET="/home/lars/docker/kairo"
mkdir -p "$TARGET"
cd "$TARGET"
if [ ! -d .git ]; then
git clone -b main "$REPO" .
else
git fetch origin main
git checkout main
git reset --hard origin/main
fi
docker compose build --no-cache
docker compose up -d --wait
curl -sf http://localhost:8004/api/health && echo "✓ PROD API /api/health OK"
if docker compose ps --status running 2>/dev/null | grep -q frontend; then
curl -sf http://localhost:3004/api/health && echo "✓ PROD Frontend-Proxy /api/health OK"
fi
docker compose exec -T backend pip install -q -r requirements-dev.txt
docker compose exec -T backend python -m pytest tests -ra -vv --tb=short
echo "✓ PROD pytest OK"
echo "=== Kairo PROD Deploy complete ==="