Skip to content

Commit 11f3e2c

Browse files
committed
Use hatch-mkdocs and hatch-pip-compile for docs deps
1 parent 03043a9 commit 11f3e2c

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
- name: Install Python
1414
uses: actions/setup-python@v4
1515
with:
16-
python-version: '3.x'
16+
python-version: '3.11'
1717
- name: Install dependencies
18-
run: pip install --no-deps -r docs/requirements.txt && pip install .
18+
run: pip install --no-deps -r requirements/requirements-docs.txt && pip install .
1919
- name: Build site
20-
run: mkdocs build
20+
run: mkdocs build --strict
2121
- name: Upload to GitHub Pages
2222
uses: actions/upload-pages-artifact@v2
2323
with:

.tools/docs-dependencies.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

pyproject.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ path = "markdown_callouts/__init__.py"
5050
[tool.hatch.build.targets.sdist]
5151
include = ["/markdown_callouts", "/tests"]
5252

53+
[tool.hatch.env]
54+
requires = [
55+
"hatch-mkdocs",
56+
"hatch-pip-compile",
57+
]
58+
5359
[tool.hatch.envs.default.scripts]
5460
all = [
5561
"hatch run style:fix",
@@ -92,14 +98,10 @@ format = [
9298
"ruff format -q markdown_callouts tests",
9399
]
94100

101+
[tool.hatch.env.collectors.mkdocs.docs]
95102
[tool.hatch.envs.docs]
96-
detached = true
97-
dependencies = [
98-
"mkdocs >=1.5",
99-
"mkdocs-material >=7.1.4",
100-
"pymdown-extensions >=8.2",
101-
"markdown-callouts >=0.1",
102-
]
103+
type = "pip-compile"
104+
pip-compile-hashes = false
103105

104106
[tool.ruff]
105107
line-length = 100

docs/requirements.txt renamed to requirements/requirements-docs.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.11
3-
# by the following command:
2+
# This file is autogenerated by hatch-pip-compile with Python 3.11
43
#
5-
# pip-compile --output-file=docs/requirements.txt -
4+
# - markdown-callouts
5+
# - mkdocs
6+
# - mkdocs-material
7+
# - pymdown-extensions
68
#
9+
710
babel==2.13.1
811
# via mkdocs-material
912
certifi==2023.7.22

0 commit comments

Comments
 (0)