Repository navigation
ci: build only affected documentation and preserve historical releases - #193
Merged
xiaoxiang781216 merged 2 commits intoOct 9, 2026
Merged
Conversation
Resolve apache#190. GitHub Actions Node.js 20 is deprecated and will be removed from runners. The ubuntu-latest label will also migrate to Ubuntu 26. This upgrade bumps: - actions/checkout from v6 to v7 - actions/setup-python from v4 to v7 - actions/upload-artifact from v5 to v7 - Python from 3.8 to 3.10 Also ensures compatibility for legacy Sphinx 4.x releases (e.g., NuttX 12.0.0) by pinning sphinxcontrib extension versions when building older releases. Signed-off-by: Swatantra Yadav <maverickswatantra@gmail.com>
The current documentation build process rebuilds the entire website and all 26 historical NuttX releases (10.0.0 through 13.1.0) on every CI run, consuming 28 to 35 minutes of CI compute and exceeding Apache Foundation workflow resource guidelines. Optimize the documentation workflow to build incrementally: - In incremental mode (default on PRs, pushes, repository_dispatch, and daily cron), restore existing compiled release documentation directly from the asf-site branch via git archive in seconds. - Automatically detect and build any newly added release tags in NuttX that are not yet present in the documentation directory. - Always build master (latest docs) to keep online documentation in sync with the upstream repository. - Provide a full rebuild option via workflow_dispatch (build_all: true) and schedule a weekly full baseline rebuild on Sundays at 00:00 UTC using deterministic github.event.schedule event matching. - Guard git commit in publish.sh against clean working trees to prevent aborts when no changes need publishing. Fixes apache#124 Signed-off-by: Swatantra Yadav <maverickswatantra@gmail.com>
xiaoxiang781216
approved these changes
Oct 9, 2026
This was referenced Oct 9, 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.
Summary
Resolves #124 (and completes the final remaining sub-issue of #129).
Currently, the GitHub Actions documentation workflow (
.github/workflows/main.yml) rebuilds the entire website along with all 26 historical NuttX releases (10.0.0through13.1.0) on every single CI run. This consumes 28 to 35 minutes of CI compute per run and repeatedly rebuilds static, immutable release tags.This PR optimizes the CI workflow to build incrementally:
asf-sitebranch viagit archive | tar -xin ~2 seconds without dirtying the git index.pull_request,push,repository_dispatch, and daily cron), the workflow:master(docs/latest) to keep online documentation in sync with NuttX core.workflow_dispatchinput (build_all: boolean, defaultfalse) for on-demand manual full rebuilds.github.event.schedule == '0 0 * * 0'matching (immune to runner queue delays).publish.sh:git committo prevent workflow aborts when a run produces no publishable differences.Impact
nuttx-websitefrom over 30 minutes to approximately 3 minutes.nuttx.apache.org/docs/.Testing
git archiverestoration locally againstorigin/asf-site: successfully extracted all 26 historical release versions in seconds with a clean git working tree.git diff --check.Note: This PR is stacked on top of #192 (Node.js 24 actions upgrade). Once #192 is merged into master, this PR will automatically reduce to just the incremental build commit.