Skip to content

Commit cdfe236

Browse files
committed
simplify doc CI
1 parent 81a40da commit cdfe236

File tree

3 files changed

+13
-26
lines changed

3 files changed

+13
-26
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
lint:
88
name: Run lint checks
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04
1010
steps:
1111
- uses: actions/checkout@v6
1212
- name: Setup PDM
@@ -79,8 +79,8 @@ jobs:
7979
with:
8080
fail_ci_if_error: false
8181
token: ${{ secrets.CODECOV_TOKEN }}
82-
html-docs:
83-
name: Build HTML documentation
82+
docs:
83+
name: Build HTML docs and manpage
8484
runs-on: ubuntu-24.04
8585
steps:
8686
- uses: actions/checkout@v6
@@ -91,31 +91,16 @@ jobs:
9191
cache: true
9292
- name: Install dependencies
9393
run: pdm sync -d -G docs
94-
- name: Build HTML
95-
run: pdm run sphinx-build -b html docs docs/_build/html
96-
- uses: actions/upload-artifact@v4
94+
- name: Build docs
95+
run: pdm run docs
96+
- uses: actions/upload-artifact@v6
9797
with:
9898
name: html-docs
99-
path: docs/_build/html
100-
manpage-docs:
101-
name: Build manpage
102-
runs-on: ubuntu-24.04
103-
steps:
104-
- uses: actions/checkout@v6
105-
- name: Setup PDM
106-
uses: pdm-project/setup-pdm@v4
107-
with:
108-
python-version: "3.11"
109-
cache: true
110-
- name: Install dependencies
111-
run: pdm sync -d -G docs
112-
- name: Build manpage
113-
run: pdm run sphinx-build -b man docs docs/_build/man
114-
- uses: actions/upload-artifact@v4
99+
path: html_docs/
100+
- uses: actions/upload-artifact@v6
115101
with:
116102
name: manpage
117-
path: docs/_build/man/getmac.1
118-
103+
path: manpage/getmac.1
119104

120105
# TODO: publish releases using CI
121106
# TODO: don't publish pre-releases OR publish them as pre-releases to PyPI

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.pdm-python
55

66
built_docs/
7+
html_docs/
8+
manpage/
79
docs/api/
810

911
.pytest_cache

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ pytest
190190

191191
[tool.pdm.scripts.html]
192192
help = "Build HTML documentation using Sphinx"
193-
cmd = "sphinx-build -j auto -b html ./docs ./built_docs"
193+
cmd = "sphinx-build -j auto -b html ./docs ./html_docs"
194194

195195
[tool.pdm.scripts.manpage]
196196
help = "Build Manpage documentation using Sphinx"
197-
cmd = "sphinx-build -b man ./docs ./built_docs"
197+
cmd = "sphinx-build -j auto -b man ./docs ./manpage"
198198

199199
[tool.pdm.scripts.docs]
200200
help = "Build all documentation formats using Sphinx"

0 commit comments

Comments
 (0)