Host multiple versions of documentation simultaneously#4830
Draft
krivard wants to merge 3 commits into
Draft
Conversation
0fdd5a9 to
8a500c5
Compare
Member
|
Member
|
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.
Overview
Working on #4822
What problem does this address?
PR #4823 created a gh-pages site that can host one single version of the documentation. our RTD deployment hosts multiple versions simultaneously. We can do that in gh-pages, but we have to do it ourselves. This PR offers one way to do it.
People seem to take two primary approaches to this:
gh-pages. Example: pyinfragh-pageseach time it is run. Example: rtd-github-pagesmainThis PR takes the first approach. It borrows most of the general structure from
pyinfra(MIT) and lifts the redirect machinery fromrtd-github-pages(GPL3).What did you change?
docs-installto pixi which conditionally places built docs into a separate _install file tree which sorts docs by version. Only installs docs to this tree for the gitrefs we want: main (as "latest"), nightly, stable, and tagged releases.latestdocs-installpixi taskgh-pagesalonegh-pages, aka, allow commits to accumulate in this branchIntended function:
gh-pagesbranch will get updated files in the directory for that versionpages-build-deploymentGHA which is provided by GitHub PagesSetup cost:
TODO:
gh-pagesat the same time; does the workflow fail gracefully or does the branch end up mangled?Documentation
Make sure to update relevant aspects of the documentation:
docs/data_sources/templates).src/metadata).Testing
How did you make sure this worked? How can a reviewer verify this?
Fork experiments!
To-do list
dbttests.make pytest-coveragelocally to ensure that the merge queue will accept your PR.build-deploy-pudlGitHub Action manually and ensure that it succeeds.