fix(techdocs): publish only changed components on push#464
Conversation
The monorepo TechDocs template republished every component on every push, generating and uploading docs sequentially (~13s each). As the number of components grew, the job stopped finishing within the ubuntu-slim runner's runtime window and was reclaimed mid-run, surfacing as cancelled runs. Compute the push diff (github.event.before..sha) and only (re)publish components whose directory changed. Falls back to a full publish when the diff cannot be determined (non-push events, missing/zero base commit, unfetchable base) or when a global file changes (workflow or root mkdocs.yml). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PAVX31ZoNgY3Zmbsa2JNi
|
I have read the CLA Document and I hereby sign the CLA 0 out of 2 committers have signed the CLA. |
|
@copilot Use the normal ubuntu runner for this action. |
Co-authored-by: GitHub Copilot <copilot@noreply.github.com>
|
@flaxel Think a partial build is reasonable, but would also like to understand where the "the job stopped finishing in time" comes from. Where and how a time constraint/ timeout comes from? |
|
@axdotl The time constraint is a hard configuration in the ubuntu slim image. |
Summary
The monorepo TechDocs template republished every component on every push, generating and uploading docs sequentially (~13s each). As the number of components grew, the job stopped finishing in time and was reclaimed mid-run, surfacing as cancelled runs.
This change computes the push diff (
github.event.before..sha) and only (re)publishes components whose directory changed. It falls back to a full publish when:mkdocs.yml).It also switches this workflow to the normal Ubuntu runner (
ubuntu-24.04) instead ofubuntu-slim.Changes
.github/workflows/template_techdocs_monorepo.yml: add incremental publish logic to the "Generate and Publish TechDocs" step..github/workflows/template_techdocs_monorepo.yml: changeruns-onfromubuntu-slimtoubuntu-24.04.🤖 Generated with Claude Code
Generated by Claude Code