Skip to content

Merge pull request #122 from harvard-lil/fat-binoc-distribution #114

Merge pull request #122 from harvard-lil/fat-binoc-distribution

Merge pull request #122 from harvard-lil/fat-binoc-distribution #114

Workflow file for this run

name: Docs
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
# The browser-demo wasm build compiles bundled SQLite (rusqlite) for
# wasm32-wasip1, which needs a WASI sysroot and a wasm-targeting clang.
# The WASI SDK bundles both. The justfile's docs-browser-demo recipe
# picks these up via WASI_SYSROOT / CC_wasm32_wasip1 (consumed by the
# `cc` crate); locally they come from `brew install wasi-libc llvm`.
- name: Install WASI SDK (for the SQLite browser-demo wasm build)
run: |
set -euo pipefail
tag=wasi-sdk-33
asset=wasi-sdk-33.0-x86_64-linux
curl -fsSL -o /tmp/wasi-sdk.tar.gz \
"https://github.com/WebAssembly/wasi-sdk/releases/download/${tag}/${asset}.tar.gz"
sudo mkdir -p /opt/wasi-sdk
sudo tar -xzf /tmp/wasi-sdk.tar.gz -C /opt/wasi-sdk --strip-components=1
echo "WASI_SYSROOT=/opt/wasi-sdk/share/wasi-sysroot" >> "$GITHUB_ENV"
echo "CC_wasm32_wasip1=/opt/wasi-sdk/bin/clang" >> "$GITHUB_ENV"
echo "AR_wasm32_wasip1=/opt/wasi-sdk/bin/llvm-ar" >> "$GITHUB_ENV"
# Regenerate every docs input the same way contributors do locally, so
# CI and local flows stay in lockstep. See ADR
# 2026-04-17-documentation_platform_and_info_design.md §6.
- run: just docs
# Fail the PR if any committed generator output is stale.
# `docs/sdk/**` and materialized test vectors are gitignored, so they
# are automatically excluded.
- name: Assert committed docs match generator output
run: git diff --exit-code -- docs/
# Build the site with --strict; fails on broken links or missing files.
- run: just docs-build
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site
deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0