| title | How these docs stay current |
|---|---|
| description | What's generated from the code, what CI checks, and how publishing works. |
This site lives in the app's repository (site/) and is built and published by GitHub Actions. Code changes and doc changes ship in the same pull request, and anything that can be generated from the code is.
| Page | Generated from |
|---|---|
| Screen reference: one page per screen | The app's ScreenCatalog and ImplementationStatus, exported by ./gradlew :core:model:exportScreenCatalog |
| API reference, one per API version | openapi/v{N}/openapi.yaml and SOURCE.yaml |
| Spec update history | openapi/CHANGELOG.md |
Hand-written help for each screen lives in site/help/screens/<id>.md and is merged into the generated page.
On every pull request and push (.github/workflows/android.yml):
- Unit tests, including that the navigation registry matches
ImplementationStatus. scripts/check_api_coverage.pyconfirms that every API call a screen makes exists in the pinnedopenapi.yaml. A spec change that removes or renames an endpoint fails the build until the app follows.site/scripts/generate.pyfails if a screen marked Available or Preview has no help page.mkdocs build --strictfails on broken links and missing pages.
.github/workflows/docs.yml publishes with mike to the gh-pages branch:
| Trigger | Publishes |
|---|---|
Push to main touching the app, site/ or openapi/ |
the dev version |
Tag v0.1.0 |
version 0.1, and moves latest to it |
| Manual run | either, on demand |
Older versions stay published, so an older app's help links keep working.
.github/workflows/api-spec-sync.yml runs daily, on demand, or when the API repository sends a openapi-updated dispatch. It:
- fetches
docs/openapi.yamlfromCompositeCode/substratalapps.com - if it changed, updates
openapi/v1/, adds a row toopenapi/CHANGELOG.md, and runs the coverage check - opens a pull request with the operations that were added or removed
Merging that pull request publishes the new reference.
To make API changes arrive immediately, the API repository's docs workflow can send the dispatch:
- run: gh api repos/CompositeCode/substratalapps-android/dispatches -f event_type=openapi-updated
env: { GH_TOKEN: "${{ secrets.ANDROID_DOCS_DISPATCH_TOKEN }}" }make docs-serve # export the catalog, generate, and serve at http://127.0.0.1:8000
make docs # strict build into site/build