name: PROMPT CI and deployment on: push: branches: [main] pull_request: workflow_dispatch: jobs: verify-and-deploy: runs-on: ces-control timeout-minutes: 35 steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 24 cache: npm - name: Install dependencies run: npm ci - name: Type check run: npm run typecheck - name: Unit tests run: npm test - name: Production build run: npm run build - name: Test standalone production server run: npm run test:smoke - name: Prepare Docker and FFmpeg for isolated integration tests run: | set -eu if [ "$(id -u)" -eq 0 ]; then SUDO=""; else SUDO="sudo -n"; fi if ! command -v docker >/dev/null || ! docker compose version >/dev/null 2>&1; then $SUDO apt-get update -qq $SUDO apt-get install -y docker.io docker-compose-v2 $SUDO systemctl enable --now docker fi if ! command -v ffmpeg >/dev/null; then $SUDO apt-get update -qq $SUDO apt-get install -y ffmpeg fi - name: Test real PostgreSQL, S3 and video processing in isolation run: bash scripts/integration.sh - name: Deploy persistent systemd service if: gitea.ref == 'refs/heads/main' && (gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch') env: RELEASE_SHA: ${{ gitea.sha }} run: bash scripts/deploy.sh "$RELEASE_SHA" "$(command -v node)"