-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First experiment: stable-docs #1
Comments
Used GPT-4 to create an initial workflow for this: https://chat.openai.com/share/dbd19d7c-c022-4a11-9a52-7217316afd2a |
The first run of that workflow created this branch: https://github.com/simonw/simonw-readthedocs-experiments/tree/stable-docs |
https://readthedocs.org/dashboard/simonw-readthedocs-experiments/advanced/ has the default settings: It's not giving me a "stable" option yet, maybe I need to ship a release? |
Here's what that release did: https://github.com/simonw/simonw-readthedocs-experiments/actions/runs/5918859742/job/16048570940 No need for it to update the branch since there were no changes to it yet. |
OK, ReadTheDocs noticed the release and created a Now settings gives me the option to switch to that, which I'll do now: https://readthedocs.org/dashboard/simonw-readthedocs-experiments/advanced/ https://simonw-readthedocs-experiments.readthedocs.io/ now redirects to https://simonw-readthedocs-experiments.readthedocs.io/en/stable/ |
That commit triggered an error: https://github.com/simonw/simonw-readthedocs-experiments/actions/runs/5918907110/job/16048660640 simonw-readthedocs-experiments/.github/workflows/stable-docs.yml Lines 25 to 30 in 03344fb
|
I think this test found that
|
OK, that worked - the commit now skips the branch creation bit, but doesn't do anything else. Next I'll test mentioning |
The thing I'm looking for here is to update But... I only want the This might work: https://chat.openai.com/share/e4605046-d9e9-4fb6-838a-d0653670bbff git show COMMIT_HASH -- docs/ > commit.patch
git apply commit.patch
git add docs/ I tested this and |
OK, empty patches are now handled. |
Why did it create a new branch? It was supposed to use the |
Oops, "No changes to docs/ in this commit." - because I edited the README not something in |
Looks promising: https://github.com/simonw/simonw-readthedocs-experiments/actions/runs/5921022485/job/16053032053 It triggered a build: https://readthedocs.org/projects/simonw-readthedocs-experiments/builds/ Those cancelled are what happens when you push a new commit before |
https://simonw-readthedocs-experiments.readthedocs.io/en/stable/ now shows: Despite the 0.2 tag not containing that: https://github.com/simonw/simonw-readthedocs-experiments/blob/0.2/docs/index.md |
I think this might be working! |
https://simonw-readthedocs-experiments.readthedocs.io/en/latest/ now has the 3 page docs site. |
If I edit |
That didn't run either. This simonw-readthedocs-experiments/.github/workflows/stable-docs.yml Lines 41 to 47 in 2efb26d
|
Because I spelt it |
That had the expected effect:
|
A new release should replace |
That worked. https://simonw-readthedocs-experiments.readthedocs.io/en/stable/ I think this is done! Need to write it up as a TIL and maybe put it into production for LLM. |
No it looks like we DO need that bit I removed in 1f25cfa |
Yeah that works again, the |
This is now running in https://github.com/simonw/llm |
I want to be able to publish updates to my
/en/stable/
docs without needing to ship an entire release - for things like typo fixes and plugin directories.My initial idea:
Have a
stable-docs
branch which is published by ReadTheDocs as the stable version.Publish workflow force-updates that branch to be a copy of the tag that was just released
A file called
_plugins.md
lives in the repo and has the content for the plugins directoryAnother workflow watches for changes to that file and automatically merges those changes into the stable-docs branch
So now… editing
_plugins.md
always goes live onstable-docs
- and edits can be made on stable-docs to other stuff too, which will be over-written the next time a stable release is issued.Would be good to have non-destructive merges into
stable-docs
when a release goes out just to avoid any chance of accidentally deleting edits made there that need to be preserved in history.Also: any time you commit a change that modifies docs, tag it with
!stable-docs
and a workflow will automatically include that change in the currentstable-docs
branch.The text was updated successfully, but these errors were encountered: