mirror of
https://github.com/UiO-Gaming/uiogaming.no.git
synced 2026-11-05 13:56:47 +01:00
Run formatting, lint, type checking and a production build on every pull request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
819 B
YAML
41 lines
819 B
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
|
|
# Public values from env.example. The build prerenders pages with data
|
|
# from Sanity, so it needs to know which project to read from
|
|
env:
|
|
NEXT_PUBLIC_SANITY_PROJECT_ID: mmqlu667
|
|
NEXT_PUBLIC_SANITY_DATASET: production
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 26
|
|
cache: npm
|
|
|
|
- run: npm ci
|
|
|
|
- name: Check formatting
|
|
run: npx prettier --check .
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
# Generates the route and next/root-params types tsc relies on
|
|
- name: Type check
|
|
run: npx next typegen && npx tsc --noEmit
|
|
|
|
- name: Build
|
|
run: npm run build
|