Skip to content

feat(docs): Docusaurus site scaffold + Pages CI (PR #1/3) #4

feat(docs): Docusaurus site scaffold + Pages CI (PR #1/3)

feat(docs): Docusaurus site scaffold + Pages CI (PR #1/3) #4

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"
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
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
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@v3
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'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: actions/deploy-pages@v4