perf: speed up preview builds with pre-built library docs#844
Merged
Conversation
… docs - Add npm caching to reduce install time by ~2 minutes - Create library-docs-generate.yml workflow to pre-build docs every 6 hours - Add skip_library_docs input to build action - Configure preview builds to use pre-built library docs instead of regenerating - Conditionally skip Python/terraform-docs setup when using pre-built docs - Production builds still generate fresh docs for accuracy Preview builds now complete in 4-7 minutes instead of 15-23 minutes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add workflow_call trigger to library-docs-generate.yml - Production workflow now calls library-docs-generate first - Production uses freshly built library docs from the release - Both preview and production now use the same tarball approach 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
When 'rebuild-library-docs' label is present on a PR, the preview build will regenerate library docs before building (like production). Default behavior uses pre-built docs from the latest release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Remove skip_library_docs input - build action now always downloads pre-built docs - Remove all library doc generation steps from build action (Python, Atmos, terraform-docs, render scripts) - Build action will error if library-docs-latest release doesn't exist - Removed .cache from cached paths (no longer needed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Rename workflow file to generate-library.yml - Update workflow name to "📚 Generate Library" - Rename jobs to cleaner names: Components, Modules, GitHub Actions, Package and Release - Update references in preview and release workflows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Erik Osterman (Cloud Posse) (osterman)
approved these changes
Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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