Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ jobs:
run: |
stars="$(gh api "repos/$GITHUB_REPOSITORY" --jq .stargazers_count)"
echo "API_REFERENCE_GITHUB_STARS=$stars" >> "$GITHUB_ENV"
- run: pnpm docs:site
- run: |
pnpm docs:site
pnpm devtools build \
--root ../.. \
--include "packages/devtools/src/internal/browser/{example-machine,*-example}.ts" \
--out-dir ../../.data/api-reference-site/v4/devtools
env:
API_REFERENCE_BASE_PATH: ${{ steps.pages.outputs.base_path }}
- uses: actions/upload-pages-artifact@v4
Expand Down
23 changes: 19 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,28 @@ ensures every reflection can be consumed by the site-facing normalizer. It runs
as part of `pnpm check`.

`pnpm docs:site` turns that dataset into a multi-page static website under
`.data/api-reference-site/v4` and creates its Pagefind search index. Run
`pnpm docs:site:serve` to preview the latest generated site locally. Site output
is also generated data and is not committed.
`.data/api-reference-site/v4` and creates its Pagefind search index.
Generate the devtools example-machine gallery under the isolated
`.data/api-reference-site/v4/devtools` route after building the main site:

```sh
pnpm docs:site
pnpm devtools build \
--root ../.. \
--include "packages/devtools/src/internal/browser/{example-machine,*-example}.ts" \
--out-dir ../../.data/api-reference-site/v4/devtools
```

Run `pnpm docs:site:serve` to preview the main site at
`http://127.0.0.1:4173/` and the gallery at
`http://127.0.0.1:4173/devtools/`. Site output is generated data and is not
committed.

The release workflow calls the GitHub Pages workflow after Changesets publishes
a package. The Pages workflow can also be run manually to deploy the current
commit before a release without invoking the package-release job. Pages supplies
commit before a release without invoking the package-release job. It uploads the
combined output, keeping the API reference at the Pages root and the devtools
gallery under `/devtools/`. Pages supplies
`API_REFERENCE_BASE_PATH` during the build so project URLs and custom domains
use the same generated site without configuration edits. It also reads the
repository star count through GitHub's API and supplies it as
Expand Down