Fix multi-version GitHub Pages docs deployment#277
Merged
Conversation
Merge missing version directories from the live site before each docs build so main-branch deploys do not drop release tag docs when tag-scoped Actions caches are unavailable. Save the full-site cache only on main, add merge unit tests and a workflow_dispatch scenario for main-after-tag. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Description
This PR fixes multi-version documentation deployment on GitHub Pages. Release tag docs were lost on subsequent
mainpushes because tag-scoped Actions caches are not visible to default-branch workflows, and each deploy replaces the entire site artifact.Changes:
docs/scripts/merge_published_site.pyto copy missing version directories from the live Pages site (or a local mock in tests) before each CI docs build.main.yml; skip the version being rebuilt (mainor the release tag).mainpushes (default-branch scope).environment: github-pageson the publish job.tests/docs/and extend theTest docs publish logicworkflow with a main-after-tag scenario.Type of change
Screenshots
N/A (CI/docs infrastructure)
Checklist
black .command to format the code base.Test plan
pytest tests/docs -q --confcutdir=tests/docsworkflow_dispatch) on GitHub after mergemainpush retains existing release version dirs on https://dexforce.github.io/EmbodiChain/Made with Cursor