# Bookra CI/CD ## Current shape - CI runs in GitHub Actions from `.github/workflows/ci.yml`. - Frontend CD stays on Vercel Git deployments. - Backend stays on Railway Git autodeploys, or consumes the GHCR image built by CI. ## CI coverage Every pull request, push to `main`, and manual workflow run executes: 1. frontend install, API client generation, typecheck, and production build 2. backend `go test` + `go build` 3. Docker image build for `apps/backend` 4. GHCR publishing on push to `main` and manual workflow runs Go is pinned via `apps/backend/go.mod`. ## Platform CD wiring ### Vercel - Create Vercel project for frontend. - Set project root directory to `apps/frontend`. - Keep Git-based deployments enabled for `main`. - Let Vercel keep monorepo auto-detection enabled. Vercel documents monorepo root-directory support and automatic per-project Git deployments. - Only override build settings if auto-detection is wrong during first import. ### Railway Create one Railway service from this repo: - backend root directory: `apps/backend` - code-based config: [apps/backend/railway.json](/home/tdvorak/Desktop/PROG+HTML/Bookra/apps/backend/railway.json:1) Enable: - GitHub Autodeploys - Wait for CI Health check: - backend: `/healthz` Published images: - `ghcr.io//bookra-backend:` Use SHA tags for production rollouts. `latest` is emitted only from the default branch. ## Local mirror of CI ```bash npm run verify docker build -t bookra-backend-ci ./apps/backend ``` ## Low-RAM act checks For local GitHub Actions validation on a memory-constrained machine, run one job at a time: ```bash act push -W .github/workflows/ci.yml -j frontend \ --concurrent-jobs 1 -b \ --container-options='--memory=3g --cpus=2' act push -W .github/workflows/ci.yml -j go \ --matrix app:apps/backend \ --concurrent-jobs 1 -b \ --container-options='--memory=3g --cpus=2' ```