Document per-step bench notes for internals cleanup lot. #137
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Verify TypeDoc on push/PR; publish to GitHub Pages on tag v* (and manual dispatch). | |
| # Pages source: repo Settings → Pages → Build and deployment → GitHub Actions. | |
| name: Docs | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ['v*'] | |
| paths: | |
| - 'src/**' | |
| - 'README.md' | |
| - 'CHANGELOG.md' | |
| - 'DESIGN_DOCUMENT.md' | |
| - 'benchmarks/README.md' | |
| - 'benchmarks/baselines/reference.json' | |
| - 'typedoc.json' | |
| - 'examples/plain_js/**' | |
| - 'examples/plain_js_frozen/**' | |
| - 'scripts/sync-docs-media.cjs' | |
| - 'scripts/build-docs.cjs' | |
| - 'scripts/build-demo.cjs' | |
| - '.github/workflows/docs.yml' | |
| pull_request: | |
| branches: [master] | |
| paths: | |
| - 'src/**' | |
| - 'README.md' | |
| - 'CHANGELOG.md' | |
| - 'DESIGN_DOCUMENT.md' | |
| - 'benchmarks/README.md' | |
| - 'benchmarks/baselines/reference.json' | |
| - 'typedoc.json' | |
| - 'examples/plain_js/**' | |
| - 'examples/plain_js_frozen/**' | |
| - 'scripts/sync-docs-media.cjs' | |
| - 'scripts/build-docs.cjs' | |
| - 'scripts/build-demo.cjs' | |
| - '.github/workflows/docs.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| verify: | |
| if: github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - run: pnpm docs:build | |
| - name: Verify generated docs/media | |
| run: | | |
| test -f docs/media/DESIGN_DOCUMENT.md | |
| test -f docs/media/CHANGELOG.md | |
| test -f docs/media/README.md | |
| test -f docs/media/reference.json | |
| test -f docs/index.html | |
| test -f docs/demo/index.html | |
| test -f docs/demo/frozenminisearch.js | |
| test -f docs/demo/shared.js | |
| test -f docs/demo/billboard_1965-2015.json | |
| test -f docs/demo/app.css | |
| ! test -L docs/demo/billboard_1965-2015.json | |
| deploy: | |
| if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - name: Set docs version | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/v* ]]; then | |
| echo "DOCS_VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_ENV" | |
| else | |
| echo "DOCS_VERSION=$(node -p "require('./package.json').version")" >> "$GITHUB_ENV" | |
| fi | |
| - name: Build docs for GitHub Pages | |
| run: DOCS_PAGES=1 DOCS_VERSION="$DOCS_VERSION" pnpm docs:build:pages | |
| - name: Verify generated docs/media | |
| run: | | |
| test -f docs/media/DESIGN_DOCUMENT.md | |
| test -f docs/media/CHANGELOG.md | |
| test -f docs/media/README.md | |
| test -f docs/media/reference.json | |
| test -f docs/index.html | |
| test -f docs/demo/index.html | |
| test -f docs/demo/frozenminisearch.js | |
| test -f docs/demo/shared.js | |
| test -f docs/demo/billboard_1965-2015.json | |
| test -f docs/demo/app.css | |
| ! test -L docs/demo/billboard_1965-2015.json | |
| - uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: docs | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |