Website
The single Website workflow, website.yml, builds and deploys the whole public site: these pages, the status page, and the pull-request previews.
Contents
What is built
- The pages are built from
docs/with the Just the Docs theme. - The status page is generated by
scripts/generate_doc.pyfrom committed.state/and its git history on every build. The checkout fetches all commits, without file contents, to read the controller run that committed each event. - A build runs on pushes to
mainthat change.state/,docs/, the generator, or the workflow itself, on pull requests that changedocs/, and on manual dispatch.
State machine pages
docs/state-machine/index.md, table.md, and decisions.md are generated from the lifecycle table by python -m scripts.generate_state_machine_doc. A test fails when they are stale. engine.md and known-gaps.md are hand-written.
Pull-request previews
Every build also renders a preview for each open pull request from a branch of this repository that changes docs/.
- Previews are served at
/porting-agent/pr/<number>/, and a comment on the pull request links to it. - The combined site is deployed once. A closed pull request’s preview is dropped on the next deploy.
- Each preview carries the same generated status page as the main site.
- Pull requests from forks get no preview.
Preview safety
Previews use pull_request_target, so the deployment runs in the base-branch context. Pull request code is never checked out or executed.
- The trusted
maincommit runs every script. - The pull request’s
docs/tree is extracted as data, without symlinks. - It is rendered by the GitHub Pages Jekyll image in safe mode, without a token.
Deployment and retries
The deploy job has only contents: read, pull-requests: read, pages: write, and id-token: write. A separate preview-comment job has only pull-requests: write. Neither receives a model credential or destination App credential.
actions/deploy-pages finds the uploaded artifact through the Actions Results service, and that listing can briefly lag behind the upload. The workflow therefore checks the artifact before it deploys:
scripts/pages_artifact.py awaitcalls the sameListArtifactslookup, scoped to this run and job. It requires exactly onegithub-pagesartifact, with the uploaded id.- A duplicate artifact or a different id fails at once. An empty listing is retried; absence fails after the last lookup.
- The first check makes up to 6 lookups, spaced 5, 10, 15 seconds and so on.
A failed deployment is retried up to three more times, four attempts in all. The retries follow waits of 15, 45, and 90 seconds, and each is preceded by the same readback with up to 3 lookups. After the fourth failure the job fails with an explicit error.
Contributing to these pages
The pages are the Markdown files under docs/. Open a pull request from a branch of this repository and use the preview linked from its comment.
- Every page has front matter with a unique
title. Top-level pages have a uniquenav_order; child pages name theirparent. - Link pages with
{{ '/path/' | relative_url }}. - Describe current behavior only. Do not describe plans or history.