5d9daee627
Backend: structured logger, env-validated config, graceful SIGTERM/SIGINT shutdown, per-IP rate limiter, per-tier scheduler concurrency latch, error context on previously-silent catches, compiled-JS Dockerfile stage. Frontend: lib/api.ts consolidates BACKEND_URL with lazy production-required check, root + per-segment error.tsx / not-found.tsx / loading.tsx, generateMetadata on park and ride pages, graceful fallback when backend is unreachable, Plausible script gated on env vars. Infra: CI runs lint + typecheck + tests on both packages before docker build, compose adds healthchecks, log rotation, and memory limits; .env.example documents every variable. Cleanup: removed empty app/api/parks/ dir and 0-byte root parks.db, moved wait-times-urls.txt into docs/, dropped an `as any` cast. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
73 lines
1.6 KiB
YAML
73 lines
1.6 KiB
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
verify:
|
|
name: Lint, typecheck, test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Install frontend deps
|
|
run: npm ci
|
|
|
|
- name: Frontend lint
|
|
run: npm run lint
|
|
|
|
- name: Frontend typecheck
|
|
run: npm run typecheck
|
|
|
|
- name: Frontend tests
|
|
run: npm test
|
|
|
|
- name: Install backend deps
|
|
run: npm ci
|
|
working-directory: backend
|
|
|
|
- name: Backend typecheck
|
|
run: npm run typecheck
|
|
working-directory: backend
|
|
|
|
- name: Backend tests
|
|
run: npm test
|
|
working-directory: backend
|
|
|
|
build-push:
|
|
name: Build & Push
|
|
needs: verify
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Log in to Gitea registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.REGISTRY }}
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push web image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
target: web
|
|
push: true
|
|
tags: ${{ vars.REGISTRY }}/${{ gitea.repository_owner }}/thoosiecalendar:web
|
|
|
|
- name: Build and push backend image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
target: backend
|
|
push: true
|
|
tags: ${{ vars.REGISTRY }}/${{ gitea.repository_owner }}/thoosiecalendar:backend
|