Skip to content

build: fix type errors and add CI enforcement #119

build: fix type errors and add CI enforcement

build: fix type errors and add CI enforcement #119

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./website
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: ./website/package-lock.json
- name: Cache Puppeteer Chromium
uses: actions/cache@v4
with:
# Keyed on the lockfile so a puppeteer version bump invalidates it.
path: ~/.cache/puppeteer
key: puppeteer-${{ runner.os }}-${{ hashFiles('website/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Run typecheck
run: npm run typecheck
- name: Build website
run: npm run build
- name: Run browser contract tests against the built site
run: npm run test:browser-contracts
env:
BROWSER_TEST_BUILD_DIR: ./build
- name: Upload browser failure traces
if: failure()
uses: actions/upload-artifact@v4
with:
name: browser-contracts-traces
path: website/browser-contracts-traces
if-no-files-found: ignore
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./website/build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4