Skip to content

Point the docs regen at titaniumsdk.com - #313

Merged
cb1kenobi merged 7 commits into
masterfrom
chris/ti-21-dispatch-to-titanium-www
Aug 30, 2026
Merged

Point the docs regen at titaniumsdk.com#313
cb1kenobi merged 7 commits into
masterfrom
chris/ti-21-dispatch-to-titanium-www

Conversation

@cb1kenobi

@cb1kenobi cb1kenobi commented Aug 28, 2026

Copy link
Copy Markdown
Member

Part of the titaniumsdk.com rebuild. The API docs pipeline gains a second destination, tidev/titanium-www, while the existing one keeps running.

What changes

  • Adds a dispatch to tidev/titanium-www carrying this repo's name in the payload. The existing dispatch sent nothing, so the regen had to check out all 17 source repos at full history on every trigger to work out what had changed. The new one fetches only this repo, shallow, sparse to apidoc/.
  • Keeps the existing dispatch to tidev/titanium-docs, unchanged, as a second job. Both pipelines run in parallel so the site being served today stays current while the replacement is proven; backing out is merging a revert.
  • Fires on a push touching apidoc/** and on a published release, rather than only on a merged pull request — a direct push is no longer missed.
  • The new dispatch lives in a reusable workflow in titanium-www, so the payload shape is defined once for all 17 source repos rather than copied into each.

Why notify does not depend on lint

Gating the dispatch on the lint job means an unrelated tooling problem stops the docs updating and nothing says so. ti.coremotion cannot run npm ci at all today — its lockfile is out of sync with its package.json — and with the gate in place its docs would silently never regenerate.

Malformed apidoc still cannot ship: the compile in titanium-www fails on unresolved references and schema violations and commits nothing, which is the right place for that check since it can see the whole corpus.

Cleanups

  • fetch-depth: 0 removed — a lint does not need full history.
  • if: steps.node-cache.outputs.cache-hit != 'true' removed; there is no node-cache step in this file, so the condition never did anything. Replaced with real npm caching.
  • Node moves to 24. Verified npm ci and lint:docs on a current Node against repos previously pinned to 16.
  • Adds a pull_request trigger so apidoc/ changes get linted before merge. notify is skipped on pull requests — a proposed change gets linted, not published.

The API docs move to tidev/titanium-www, so the dispatch retargets there and
carries this repo's name in the payload. The old dispatch sent nothing, which is
why the regen had to check out all 17 source repos to work out what had changed;
it now fetches only this one.

Fires on a push touching apidoc/ and on a published release, rather than only on
a merged pull request, so a direct push to master is no longer missed.

The dispatch step itself moves into a reusable workflow in titanium-www so the
payload shape is defined once for all 17 source repos.

Also drops two things carried along for years: a full-history checkout that a
lint does not need, and an `if:` guarding npm ci on a `node-cache` step that
does not exist in this file.
Restores workflow_dispatch, which several of these repos had and the replacement
dropped, removing the only way to force a regen by hand from the Actions tab.

Adds a pull_request trigger so the lint job runs on a proposed change. Without
it these PRs get no CI at all, and the Node bump from 16 to 24 would surface
only after merge -- when a push to the default branch fails, the dispatch never
fires, and nothing says so.

notify is skipped on pull_request: a proposed change gets linted, not published.
notify no longer needs lint. Gating the dispatch on the lint job means an
unrelated tooling problem stops the docs updating and nothing says so.

ti.coremotion cannot run `npm ci` at all today -- its package-lock.json is out
of sync with package.json, missing escape-string-regexp@1.0.5 -- so with the
gate in place its docs would never regenerate again, silently. Its Regen Docs
workflow has in fact never run once, and ti.map's last run failed in April.

Genuinely malformed apidoc still cannot ship. The compile in titanium-www fails
on unresolved references and schema violations and commits nothing, so the
protection is downstream where it can see the whole corpus. The lint here is a
second, advisory check and now reports independently.
Both pipelines now fire. The site currently being served keeps updating while
the replacement is proven, and backing out is merging a revert rather than
racing to restore a dispatch.

The legacy job carries no payload because titanium-docs does not read one --
it rebuilds every source repo on any dispatch, which is the inefficiency
titanium-www exists to replace. Marked for deletion once titaniumsdk.com is
served from titanium-www.
From the review on titanium-sdk#14564, applied to all 17 repos so the template
stays identical across them:

- Job renamed back to `regen`, matching what was there before.
- actions/checkout and actions/setup-node moved to v7.
- Node 26.
- Every step given a name.

The setup-node suggestion as written would have produced two steps -- a bare
`- name:` followed by a separate `- uses:` -- so it is applied as one named step
on v7.
peter-evans/repository-dispatch v3 -> v4, matching the version bumps applied
across titanium-www's own workflows so every file in the pipeline pins the same
majors.
titanium-sdk carried `github.repository_owner == 'tidev'` and the module repos
did not -- an inherited asymmetry, not a decision. Worse, this branch had it on
the wrong job: once notify stopped depending on lint, guarding lint stopped
guarding anything. A fork would skip the one job that is useful there and still
run both dispatch jobs, which fail because a fork holds no dispatch token.

The guard now sits on the two jobs that reach outside the repo, in all 17 repos.
Forks lint their own apidoc changes, which is worth having, and produce no
failing dispatch runs.

It is about noise, not security. A fork has no REGEN_DOCS_GITHUB_TOKEN, and even
with one the payload names the fork, which is not on titanium-www's allowlist --
that allowlist is the actual boundary.
@cb1kenobi
cb1kenobi merged commit 9685b7c into master Aug 30, 2026
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant