Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

# Every branch push, so a branch is checked before it ever reaches a pull
# request. Deployment lives in deploy.yml and stays restricted to main — nothing
# here publishes anything.
on:
push:
branches: ['**']
pull_request:
workflow_dispatch:

permissions:
contents: read

# One run per ref: pushing again supersedes an in-flight check of the same branch.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
# For a branch in this repo the push event already covers it, so skip the
# duplicate pull_request run. Fork PRs raise no push event here, and are the
# reason the pull_request trigger is kept at all.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm test
# `npm run build` is `tsc --noEmit && vite build`, so this type-checks too.
- run: npm run build
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
node-version: 22
cache: npm
- run: npm ci
# Gate the deploy on the suite: main should not publish a build whose tests
# fail. CI (ci.yml) runs the same command on every branch push; this is the
# last check before the site is actually replaced.
- run: npm test
- run: npm run build
env:
NODE_ENV: production
Expand Down
Loading