Repository navigation
ci: Change blueapi github pages site publishing #1604
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
Changes from all commits
7eb3698
5927520
8371fdb
fa3cd8e
dce4c89
ba1a990
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # .github/workflows/publish-dispatch.yml | ||
| name: Publish (dispatch) | ||
| on: | ||
| workflow_call: # ci.yml's `publish` job, for every event | ||
| inputs: | ||
| version-name: {required: false, default: "", type: string} | ||
| # tag re-dispatch + fork-PR preview + manual re-deploy | ||
| workflow_dispatch: | ||
| inputs: | ||
| pr: | ||
| description: "Fork PR to approve + preview (empty = re-deploy)" | ||
| required: false | ||
| default: "" | ||
| retry-until: | ||
| description: "Internal = epoch-second retry deadline. Don't set manually." | ||
| required: false | ||
| default: "" | ||
|
|
||
| jobs: | ||
| publish: | ||
| uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/publish.yml@v0.24 | ||
| with: | ||
| # "" on dispatch → pure durable gather | ||
| version-name: ${{ inputs.version-name }} | ||
| # set (dispatch) → pin that fork head SHA | ||
| pr: ${{ inputs.pr }} | ||
| # the file the tag re-dispatch re-fires | ||
| dispatch-workflow: publish-dispatch.yml | ||
| # forwarded so the re-dispatch job's auto-retry can re-fire this shim | ||
| retry-until: ${{ inputs.retry-until }} | ||
| permissions: | ||
| contents: read | ||
| actions: write | ||
| pages: write | ||
| id-token: write | ||
| statuses: write |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,9 +5,8 @@ | |
| https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
| """ | ||
|
|
||
| import os | ||
| import sys | ||
| from pathlib import Path | ||
| from subprocess import check_output | ||
|
|
||
| import requests | ||
|
|
||
|
|
@@ -21,14 +20,7 @@ | |
| # The full version, including alpha/beta/rc tags. | ||
| release = blueapi.__version__ | ||
|
|
||
| # The short X.Y version. | ||
| if "+" in release: | ||
| # Not on a tag, use branch name | ||
| root = Path(__file__).absolute().parent.parent | ||
| git_branch = check_output("git branch --show-current".split(), cwd=root) | ||
| version = git_branch.decode().strip() | ||
| else: | ||
| version = release | ||
| version = os.environ.get("VERSION_NAME", "local") | ||
|
|
||
| extensions = [ | ||
| # Use this for generating API docs | ||
|
|
@@ -172,7 +164,7 @@ | |
| "version_match": version, | ||
| }, | ||
| "check_switcher": False, | ||
| "navbar_end": ["theme-switcher", "icon-links", "version-switcher"], | ||
| "navbar_end": ["theme-switcher", "navbar-icon-links", "version-switcher"], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line change was a surprise, why is it needed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's what was in the code here |
||
| "navigation_with_keys": False, | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are only 3 versions post 1.0.0 which are not deployed because they don't have their docs.zip file in the release assets.
List of versions not deployed
0.0.1-pre
0.0.1-pre1
0.0.1-pre2
0.0.1-pre3
0.0.1-pre4
0.0.1-pre5
0.0.1-pre6
0.0.2
0.0.3
0.0.4
0.1.0
0.2.0
0.2.1
0.2.2
0.2.3
0.2.3b1
0.3.0
0.3.1
0.3.10
0.3.11
0.3.12
0.3.13
0.3.14
0.3.15
0.3.15-a0
0.3.15-alpha0
0.3.15-alpha1
0.3.15-dev0
0.3.15a0
0.3.2
0.3.3
0.3.4
0.3.5
0.3.5-alpha
0.3.5-beta
0.3.5-beta10
0.3.5-beta11
0.3.5-beta12
0.3.5-beta2
0.3.5-beta3
0.3.5-beta4
0.3.5-beta5
0.3.5-beta6
0.3.5-beta7
0.3.5-beta8
0.3.5-beta9
0.3.6
0.3.7
0.3.8
0.3.9
0.4.0
0.4.5-a2
0.4.5-a4
0.4.5-a5
1.2.1
1.6.1
1.7.2
I think it will not be a problem in the future because publish needs docs.
It could have a verification at the end to check if the current release page is deployed so we don't fail silently.