Swatantra-66 opened a new pull request, #193:
URL: https://github.com/apache/nuttx-website/pull/193

   ## 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.0` through `13.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:
   1. **Preserves Existing Historical Docs**: In incremental mode, existing 
compiled release documentation is restored directly from the `asf-site` branch 
via `git archive | tar -x` in ~2 seconds without dirtying the git index.
   2. **Builds Only Affected Documentation**: By default (on `pull_request`, 
`push`, `repository_dispatch`, and daily cron), the workflow:
      - Automatically detects and builds any newly added release tags in NuttX 
that are not yet present in the documentation directory.
      - Always builds `master` (`docs/latest`) to keep online documentation in 
sync with NuttX core.
      - Reduces build time from **~35 minutes down to ~3 minutes** (~90% 
compute savings).
   3. **Preserves Full Rebuild Capability**:
      - Added `workflow_dispatch` input (`build_all: boolean`, default `false`) 
for on-demand manual full rebuilds.
      - Added a weekly baseline full rebuild on Sunday at 00:00 UTC using 
deterministic `github.event.schedule == '0 0 * * 0'` matching (immune to runner 
queue delays).
   4. **Hardened `publish.sh`**:
      - Added a staged diff check before `git commit` to prevent workflow 
aborts when a run produces no publishable differences.
   
   ## Impact
   
   - Substantially reduces Apache GitHub Actions runner minutes, aligning with 
ASF workflow resource policies.
   - Decreases PR review feedback loops on `nuttx-website` from over 30 minutes 
to approximately 3 minutes.
   - Ensures all historical releases remain published and accessible on 
`nuttx.apache.org/docs/`.
   
   ## Testing
   
   - Validated `git archive` restoration locally against `origin/asf-site`: 
successfully extracted all 26 historical release versions in seconds with a 
clean git working tree.
   - Verified YAML syntax with PyYAML parser.
   - Verified zero whitespace or formatting errors via `git diff --check`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to