Skip to content
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

docs: add versioning #1974

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:
types:
- release-docs
# Allow manual trigger for now
workflow_dispatch:
# workflow_dispatch:
ion-elgreco marked this conversation as resolved.
Show resolved Hide resolved

env:
IS_RELEASE: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' }}
BUILD_ARGS: ${{ (github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch') && 'install MATURIN_EXTRA_ARGS="--manylinux off"' || 'develop' }}
IS_RELEASE: ${{ github.event_name == 'repository_dispatch' }}
BUILD_ARGS: ${{ (github.event_name == 'repository_dispatch') && 'install MATURIN_EXTRA_ARGS="--manylinux off"' || 'develop' }}

jobs:
markdown-link-check:
Expand Down Expand Up @@ -77,7 +77,9 @@ jobs:
- name: Build
run: |
source python/venv/bin/activate
mkdocs build
var=$(echo ${{ github.event.client_payload.tag || github.ref_name }} | sed 's/^python-v//')
mike set-default latest
mike deploy --push --update-aliases $var latest

- name: Deploy
if: ${{ env.IS_RELEASE == 'true' }}
Expand Down
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ mkdocs-autorefs==0.5.0
mkdocs-material==9.4.5
mkdocs-macros-plugin==1.0.4
markdown-exec[ansi]==1.7.0
mkdocs-simple-hooks==0.1.5
mkdocs-simple-hooks==0.1.5
mike==2.0.0
7 changes: 6 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ plugins:
- mkdocs-simple-hooks:
hooks:
on_page_markdown: 'docs._build.hooks:on_page_markdown'

- mike:
# These fields are all optional; the defaults are as below...
version_selector: true
markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
Expand All @@ -144,6 +146,9 @@ markdown_extensions:
extra:
python_api_url: https://delta-io.github.io/delta-rs/api/
generator: false
version:
provider: mike
default: latest
social:
- icon: fontawesome/brands/slack
link: https://go.delta.io/slack
Expand Down
Loading