You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 265959d
Browse filesBrowse the repository at this point in the historyBrowse files
Cleanup concurrency problems in doc generation (NVIDIA#2914)
* ClosesNVIDIA#2197
The `gh-pages` branch has accumulated thousands of generated-site commits, substantially increasing the size of full repository clones.
This PR keeps `gh-pages` at a single commit while preserving the existing documentation, PR previews, and coverage pages. It:
- Enables `single-commit` publishing for documentation, PR previews, preview removal, and coverage.
- Serializes every automated `gh-pages` writer using the shared `cuda-python-gh-pages-publish` concurrency group.
- Separates expensive docs and coverage generation from the serialized deployment jobs, so builds can still run in parallel.
- Passes generated output to the deployment jobs through workflow artifacts.
- Updates stale-preview cleanup to:
- Work from a detached snapshot without modifying a local `gh-pages` branch.
- Create a parentless commit containing the updated complete tree.
- Push using an explicit `--force-with-lease`.
- Permit remote pushes only from the serialized cleanup workflow.
- Adds the required targeted `actionlint` suppressions for GitHub's `concurrency.queue` extension.
Preview and coverage pages remain intact because every deployment begins with the existing `gh-pages` tree and updates only its assigned target directory.
This change intentionally performs a non-fast-forward update on every deployment. The active `Protect gh-pages` ruleset currently blocks these updates.
Before exercising this workflow—including PR preview deployment—the authenticated publishing actor must have an `always` bypass for the ruleset, or the force-push restriction must be changed. `git-config-name: cuda-python-bot` is only commit metadata; as written, the authenticated actor is the GitHub Actions integration.
The `Restrict deletions` rule is not otherwise a problem: the workflows delete files within commits, not the `gh-pages` branch ref.
Granting the GitHub Actions integration a bypass is relatively broad. If that is undesirable, deployment should instead use a dedicated GitHub App with narrowly scoped repository permissions.
- Drain any docs, coverage, and cleanup jobs started with the previous workflow before the first compacting deployment. Concurrency groups do not apply retroactively.
- After the first deployment, verify that:
- `gh-pages` contains one commit.
- Latest and versioned documentation still exist.
- Existing PR previews still exist.
- Coverage pages still exist.
- If a deployment-only job fails, use **Re-run all jobs** so its prerequisite job recreates the deployment artifact.
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
* Make cancel-in-progress false explicitly.
* add no force-push. Let nightly job be sole owner of doc cleanup. remove single-commit.
* ci: harden PR preview deployment and cleanup
Responding to Leo's comments.
- detect preview builds using pull-request refs
- honor deploy-docs for all documentation deployments
- keep nightly cleanup as the sole gh-pages cleanup writer
- add read-only manual preview inspection
- retire sticky comments for closed PR previews
* Address Andy's comments.
---------
Co-authored-by: Leo Fang <[email protected]>
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1
+
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
2
#
3
3
# SPDX-License-Identifier: Apache-2.0
4
4
5
5
name: Docs in PRs
6
-
description: Preview or clean up docs built from PRs
6
+
description: Preview docs built from PRs
7
7
8
8
# A re-implementation based on the logic of https://github.com/rossjrw/pr-preview-action/blob/41a957c44a456a34718e9bcf825363194db5e6d5/README.md, due to limitations illustrated in NVIDIA/cuda-python#380.
9
9
@@ -18,20 +18,23 @@ inputs:
18
18
runs:
19
19
using: composite
20
20
steps:
21
-
# The steps below are executed only when testing in a PR.
22
-
# Note: the PR previews will be removed once merged to main or release/* (see below)
0 commit comments