Skip to content

v1.8.0

v1.8.0 #42

Workflow file for this run

name: Docs
on:
pull_request:
branches: [main]
paths:
- "website/**"
- ".github/workflows/docs.yml"
push:
branches: [main]
paths:
- "website/**"
- ".github/workflows/docs.yml"
# The /download page resolves the current release's assets at build time so it
# can link each platform to its actual file. Without this trigger that data
# would freeze at whatever the last website/** change saw, and the page would
# keep serving the previous version's binaries after every release.
# Pre-releases are skipped: /releases/latest ignores them, so the built output
# would be byte-identical.
release:
types: [published]
workflow_dispatch:
# Cancel in-flight runs on the same ref so fast follow-up pushes
# don't queue stale builds.
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Build site
runs-on: ubuntu-latest
# A pre-release does not change what /releases/latest resolves to, so
# rebuilding for one would burn a run to produce identical output.
if: github.event_name != 'release' || github.event.release.prerelease == false
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 22
cache: npm
cache-dependency-path: website/package-lock.json
- name: Install dependencies
working-directory: website
run: npm ci
- name: Type-check
working-directory: website
run: npm run typecheck
- name: Build
working-directory: website
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: website/build
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/main')
|| github.event_name == 'release'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5