-
-
Notifications
You must be signed in to change notification settings - Fork 111
docs: Add versioning to documentation #1533
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
base: main
Are you sure you want to change the base?
Changes from all commits
599ac6c
9c381b4
6fc3a76
0418e5b
b6d0077
1395d60
9ac1143
1d33aca
5c63ca1
8a5dd5c
675eca8
ba7f8ce
5ed65da
e718ab3
5884246
6f41234
01a30ab
a11be29
93f15c7
efb4018
5a1698b
80d3ad3
275750e
f846915
90d9e37
bb0835f
6810545
17dd825
0e6b504
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ on: | |
- dryrun | ||
required: true | ||
default: dryrun | ||
version: | ||
description: 'Version tag X.X.X (required if target is main)' | ||
required: false | ||
schedule: | ||
- cron: '0 15 * * SUN' | ||
|
||
|
@@ -36,46 +39,35 @@ jobs: | |
|
||
docs_build: | ||
name: Build Documentation | ||
needs: [pixi_lock] | ||
runs-on: 'macos-latest' | ||
timeout-minutes: 120 | ||
env: | ||
DISPLAY: ":99.0" | ||
VERSION: ${{ inputs.version }} | ||
steps: | ||
- name: Validate version | ||
if: ${{ inputs.target == 'main' }} | ||
run: | | ||
if [[ -z "$VERSION" || ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
echo "❌ 'version' is required and must match format X.X.X (e.g. 0.11.1) when target is 'main'" | ||
exit 1 | ||
fi | ||
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0 | ||
with: | ||
environments: docs | ||
- name: Build documentation | ||
run: pixi run -e docs docs-build | ||
- name: Set and echo git ref | ||
id: vars | ||
run: | | ||
echo "Deploying from ref ${GITHUB_REF#refs/*/}" | ||
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
- name: report failure | ||
if: failure() | ||
run: cat /tmp/sphinx-*.log | tail -n 100 | ||
- name: Deploy dev | ||
uses: peaceiris/actions-gh-pages@v4 | ||
if: | | ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') || | ||
(github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))) | ||
with: | ||
personal_token: ${{ secrets.ACCESS_TOKEN }} | ||
external_repository: holoviz-dev/hvplot | ||
publish_dir: ./builtdocs | ||
force_orphan: true | ||
exclude_assets: '.doctrees' | ||
- name: Deploy main | ||
if: | | ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') || | ||
(github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))) | ||
uses: peaceiris/actions-gh-pages@v4 | ||
- uses: holoviz-dev/holoviz_tasks/docs-publish@docs_publish | ||
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. It also needs to be updated when holoviz-dev/holoviz_tasks#44 is merged. |
||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./builtdocs | ||
cname: hvplot.holoviz.org | ||
force_orphan: true | ||
exclude_assets: '.doctrees' | ||
s3-url: s3://hvplot.holoviz.org | ||
s3-cloudfront-id: E13QSRL36ILGWH | ||
s3-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
s3-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
version: ${{ inputs.version }} | ||
|
||
pip_build_docs: | ||
name: Build Documentation (pip) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"version": "dev", | ||
"url": "https://hvplot-test.holoviz.org/en/docs/dev/" | ||
}, | ||
{ | ||
"name": "0.11.3 (latest)", | ||
"version": "0.11.3", | ||
"url": "https://hvplot-test.holoviz.org/en/docs/latest/", | ||
"preferred": true | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,9 +36,14 @@ | |
html_js_files = [ | ||
'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js', | ||
] | ||
|
||
switcher_version = ( | ||
os.getenv('VERSION') or 'dev' | ||
if any(pr in hvplot.__version__ for pr in ('a', 'b', 'rc', 'dev')) | ||
else version | ||
) | ||
html_theme_options.update( # noqa | ||
{ | ||
'navbar_start': ['navbar-logo', 'version-switcher'], | ||
'use_edit_page_button': True, | ||
'github_url': 'https://github.com/holoviz/hvplot', | ||
'icon_links': [ | ||
|
@@ -60,6 +65,11 @@ | |
], | ||
'pygments_dark_style': 'material', | ||
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. Unrelated to docs versioning |
||
# 'announcement': "hvPlot 0.11 has just been released! Checkout the <a href='https://blog.holoviz.org/posts/hvplot_release_0.11/'>blog post</a> and support hvPlot by giving it a 🌟 on <a href='https://github.com/holoviz/hvplot'>Github</a>.", | ||
'switcher': { | ||
'json_url': 'https://hvplot-test.holoviz.org/switcher.json', | ||
'version_match': switcher_version, | ||
}, | ||
'show_version_warning_banner': True, | ||
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 will not show anything as the version for the dev build is clean and tested locally with an alpha tag, which shows the warning banner. |
||
} | ||
) | ||
|
||
|
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.
Adding this here to fail fast.