Repository navigation
Prevent fork deployments and publish documentation only from develop - #550
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An older build can displace the newest pending deployment and then reject itself as stale, leaving current documentation unpublished.
1 open issue
What changed in this PR
This PR restricts SimPaths documentation publication to the upstream repository’s develop branch while preserving documentation validation on main, develop, and pull requests.
Changes:
- Add repository and branch guards to prevent fork and
maindeployments. - Gate expensive documentation checks on complete Git diffs, with conservative fallbacks and forced manual builds.
- Add change-detection tests and workflow documentation, and move Pages concurrency to deployment jobs.
| File | Description |
|---|---|
.github/workflows/docs-checks.yml |
Gate expensive validation while keeping the check job present. |
.github/workflows/deploy-docs.yml |
Restrict publication and add deployment freshness checks. |
.github/scripts/test_docs_changes.py |
Test input selection and Git-history edge cases. |
.github/scripts/README.md |
Document build triggers and publication behavior. |
.github/scripts/docs_changes.py |
Detect relevant changes from event-specific Git diffs. |
Review effort: Balanced
dav-sonn
approved these changes
Oct 27, 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.

Fork syncs currently attempt GitHub Pages deployment and fail when the fork has no Pages configuration. The older workflow on main also still targets main for publication.
This aligns main with the fix on develop (582acba). Only
simpaths/SimPathsondevelopcan publish. Documentation validation remains available for main/develop pushes and pull requests, while expensive build steps run only when website, API or build inputs change. Unrelated changes still receive a successfulcheckjob; manual runs force a build.Change detection uses complete Git diffs, including deletions, renames and multi-commit syncs, and builds conservatively if history is unavailable. Deployments use
queue: maxso an older build finishing late cannot cancel a newer pending deployment. The freshness check then prevents outdated website/API content from being published. GitHub limits this queue to 100 pending jobs; publication can be retried manually if that limit is reached. Only deployments enter the queue, so unrelated pushes cannot displace them.The same five workflow/helper files are used on both branches. No website content or model code changes are included. The Pages environment already permits only develop.
Validation:
concurrency.queuediagnostic excluded; the setting is documented by GitHub and present in the current workflow schema.References: GitHub concurrency rules, actionlint limitation.