[INFRA] Reuse docs Docker image and composite action in pages.yml#56204
Draft
zhengruifeng wants to merge 1 commit into
Draft
[INFRA] Reuse docs Docker image and composite action in pages.yml#56204zhengruifeng wants to merge 1 commit into
zhengruifeng wants to merge 1 commit into
Conversation
0df5c04 to
967f6e3
Compare
…s.yml In build_and_test.yml: - For master (inputs.branch == ''), always build the full documentation site without SKIP_PYTHONDOC / SKIP_RDOC change detection, so the deployed site is always complete. - Upload docs/_site as artifact docs-site-<branch>-<sha> (retention: 1 day). In pages.yml: - Replace the self-contained build with a workflow_run trigger that fires after the "Build" workflow completes on master. - The deploy job prints the triggering commit title, downloads the artifact produced by CI, and publishes it to GitHub Pages — no build tooling needed. Generated-by: Claude Code (https://claude.ai/code)
967f6e3 to
b07028c
Compare
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 changes were proposed in this pull request?
This PR does two things:
Adds a reusable workflow at
.github/workflows/build-docs.ymlthat encapsulates the full docs job logic: branch-specific setup, Bundler/gem installation, optional version-string patching, theSKIP_APIpre-build,dev/is-changed.pychange detection, and the finalbundle exec jekyll build. It also accepts acommit_shainput used as a suffix in the fork-preview tar filename. Whenupload_site: trueit uploadsdocs/_siteas artifact `docs-site` for Pages deployment.Updates
pages.ymlto call the reusable workflow (using the same pre-built Docker image cache that `build_and_test.yml` already uses), then deploy the uploaded artifact in a separate `deploy` job. This eliminates the ~100 lines of duplicated setup that previously re-installed Java, Python 3.11, Ruby, Pandoc, and pip packages from scratch on every master push.`build_and_test.yml`'s `docs` job is replaced by a one-liner `uses:` call to the reusable workflow, removing ~120 lines of inline steps.
Why are the changes needed?
`pages.yml` was installing all documentation tooling from scratch on a bare runner, duplicating the setup that `build_and_test.yml` does via a pre-built Docker image. This caused version skew (Python 3.11 vs 3.12, different pip pins) and wasted CI time on every master push.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Workflow-only change; no unit tests. The reusable workflow logic is identical to the inline steps it replaces, verified by inspection.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (https://claude.ai/code)