perf: speed up preview builds with pre-built library docs #844
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what
generate-library.ymlworkflow builds library docs weekly (Monday 8am UTC)rebuild-library-docslabel to force library doc regeneration on PR previewsExpected Results
How it works
Library Docs Generation (
generate-library.yml)The workflow generates docs in parallel across 3 jobs:
After all jobs complete, a Package and Release job:
library-docs.tar.gzlibrary-docs-latestThis workflow runs:
scripts/docs-collator/**changesrebuild-library-docslabel is presentBuild Action (simplified)
The build action (
build-website) now only:.build-harnesslibrary-docs-latestreleasemake build-productionThe build will fail if no
library-docs-latestrelease exists. The library docs workflow must run at least once to bootstrap.Preview Builds (on PR)
Optional: Add the
rebuild-library-docslabel to force fresh library doc generation.Production Builds
generate-library.ymlto regenerate fresh library docs (parallel jobs)Changes Summary
New Files
.github/workflows/generate-library.yml- Parallel library docs generation workflowModified Files
.github/actions/build-website/action.yml.github/workflows/website-deploy-preview.ymlrebuild-library-docslabel support.github/workflows/website-deploy-release.ymlgenerate-library.ymlbefore buildingCaching
why
Preview builds were taking 35-40 minutes due to sequential library documentation generation. Since library content (components, modules, GitHub Actions docs) rarely changes during PR reviews, using pre-built docs is acceptable for preview environments while production always gets fresh docs.
references
generate-library.ymlworkflow required to bootstrap thelibrary-docs-latestrelease before any builds will work