Skip to content

perf(publish-tech-docs): use the TechDocs tools baked into the ARC runners - #396

Draft
JesperTerkelsen wants to merge 1 commit into
mainfrom
JesperTerkelsen/github-cache-arc-scan
Draft

JesperTerkelsen wants to merge 1 commit into
mainfrom
JesperTerkelsen/github-cache-arc-scan

Conversation

@JesperTerkelsen

Copy link
Copy Markdown
Member

Summary

publish-tech-docs.yml uses the TechDocs toolchain baked into the ARC runner image by https://github.com/monta-app/actions-runner/pull/45, instead of installing it on every run.

A new first step checks that techdocs-cli is on PATH and that the Python behind mkdocs imports techdocs_core, mkdocs_literate_nav and mermaid2. When it does, the job skips setup-node, setup-python, npm install -g @techdocs/cli and the pip install. Otherwise it logs that and installs as before. That covers public repos on ubuntu-24.04-arm and ARC pods still on an older image.

Why

Measured on arc-arm64-2cpu-4gb: the installs take 27–46s of a 50–70s job (service-ocpi: 34s npm + 12s pip + 10s setup-python of 70s; service-wallet: 21s + 6s + 6s of 50s). That's on every push to main in the 55 repos that call this workflow.

Testing

  • actionlint passes.
  • I ran the check script in the runner image with the tools (present=true) and in the current image without them (falls back to installing).
  • In the image with the tools, techdocs-cli generate --no-docker builds service-wallet's real docs/.

Gaps

  • Merge https://github.com/monta-app/actions-runner/pull/45 first, then sync ARC. Merging this one first is harmless: it keeps installing until the tools are on the runners.
  • The baked versions are pinned in actions-runner (@techdocs/cli 1.13.0, mkdocs-techdocs-core 1.7.1). The install fallback stays unpinned (latest, 1.*), as it is today.
  • The 13 repos that copy these install steps into their own workflows aren't changed here.

🤖 Generated with Claude Code

…nners

The ARC runner image now ships @techdocs/cli and mkdocs with the
techdocs-core, literate-nav and mermaid2 plugins
(monta-app/actions-runner). When techdocs-cli is on PATH and the Python
behind mkdocs imports the three plugins, setup-node, setup-python and
both installs are skipped. They took 27-46s of a 50-70s job on
arc-arm64-2cpu-4gb, on every push to main in the 55 calling repos.
Other runners install as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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