GitHub Actions CI

The CI pipeline for a Next.js app is almost identical to the one you built in the backend phase. The difference is the build step: Next.js has its own next build command that compiles and produces the standalone output. Everything else (lint, type-check, test) runs the same way.

.github/workflows/ci.yml
yaml
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci
      - run: npx tsc --noEmit
      - run: npm run lint
      - run: npm run test
      - run: npm run build

The full frontend pipeline in one file.

Quiz: Quiz

Loading practice…