Skip to content

Commit

Permalink
Use hatch-mkdocs and hatch-pip-compile for docs deps
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Nov 24, 2023
1 parent 95194eb commit fb047ef
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.11'
- name: Install dependencies
run: pip install --no-deps -r docs/requirements.txt
run: pip install --no-deps -r requirements/requirements-docs.txt
- name: Build site
run: mkdocs build
run: mkdocs build --strict
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v2
with:
Expand Down
4 changes: 0 additions & 4 deletions .tools/docs-dependencies.sh

This file was deleted.

16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ path = "mkdocs_literate_nav/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["/mkdocs_literate_nav", "/tests"]

[tool.hatch.env]
requires = [
"hatch-mkdocs",
"hatch-pip-compile",
]

[tool.hatch.envs.default.scripts]
all = [
"hatch run style:fix",
Expand Down Expand Up @@ -91,14 +97,10 @@ format = [
"ruff format -q mkdocs_literate_nav tests",
]

[tool.hatch.env.collectors.mkdocs.docs]
[tool.hatch.envs.docs]
detached = true
dependencies = [
"mkdocs >=1.5",
"mkdocs-material >=7.1.4",
"pymdown-extensions >=8.2",
"markdown-callouts >=0.1",
]
type = "pip-compile"
pip-compile-hashes = false

[tool.ruff]
line-length = 100
Expand Down
9 changes: 6 additions & 3 deletions docs/requirements.txt → requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
# This file is autogenerated by hatch-pip-compile with Python 3.11
#
# pip-compile --output-file=docs/requirements.txt -
# - markdown-callouts
# - mkdocs
# - mkdocs-material
# - pymdown-extensions
#

babel==2.13.1
# via mkdocs-material
certifi==2023.7.22
Expand Down

0 comments on commit fb047ef

Please sign in to comment.