Skip to content

Commit

Permalink
Add suport for mike serve
Browse files Browse the repository at this point in the history
  • Loading branch information
ioangatop committed Mar 19, 2024
1 parent d58f856 commit 1da1115
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Publish Develop Docs

on:
pull_request:
push:
branches:
- main
Expand Down Expand Up @@ -31,4 +32,6 @@ jobs:
git config user.name "GitHub Action"
- name: Build Documentation
run: |
nox -s docs -- gh-deploy --force --remote-branch gh-pages
git fetch origin gh-pages:gh-pages
nox -s docs -- deploy --update-aliases dev
git push origin gh-pages
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ theme:
name: Switch to dark mode
plugins:
search: null
mike: null
mkdocstrings:
handlers:
python:
Expand All @@ -42,6 +43,9 @@ plugins:
show_root_heading: true
filters:
- '!^_'
extra:
version:
provider: mike
markdown_extensions:
- toc:
toc_depth: 2
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def docs(session: nox.Session) -> None:
"""Builds and deploys the code documentation."""
args = session.posargs or []
session.run_always("pdm", "install", "--group", "docs", external=True)
session.run("pdm", "run", "mkdocs", *args)
session.run("pdm", "run", "mike", *args)


@nox.session
Expand Down
118 changes: 116 additions & 2 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ test = [
]
docs = [
"mkdocs>=1.5.3",
"mkdocstrings[python]>=0.24.0",
"mkdocs-material>=9.5.6",
"mkdocstrings[python]>=0.24.0",
"mike>=2.0.0",
"setuptools>=62.3.3",
"markdown-exec>=0.7.0",
"mkdocs-redirects>=1.2.0",
"mkdocs-version-annotations>=1.0.0",
]
dev = [
"isort>=5.12.0",
Expand All @@ -100,8 +105,13 @@ dev = [
"pytest>=7.2.2",
"pytest-cov>=4.1.0",
"mkdocs>=1.5.3",
"mkdocstrings[python]>=0.24.0",
"mkdocs-material>=9.5.6",
"mkdocstrings[python]>=0.24.0",
"mike>=2.0.0",
"setuptools>=62.3.3",
"markdown-exec>=0.7.0",
"mkdocs-redirects>=1.2.0",
"mkdocs-version-annotations>=1.0.0",
]

[tool.isort]
Expand Down

0 comments on commit 1da1115

Please sign in to comment.