Skip to content

Commit 13dcb49

Browse files
committed
Update CI docs job from Sphinx to mkdocs build
Replace inline Python doc generation with mkdocs build --strict.
1 parent 809450f commit 13dcb49

1 file changed

Lines changed: 3 additions & 42 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -247,50 +247,11 @@ jobs:
247247

248248
- name: Install dependencies
249249
run: |
250-
poetry install --with dev
251-
poetry add --group dev sphinx sphinx-rtd-theme
250+
poetry install --with dev,docs
252251
253-
- name: Check docstrings
254-
run: |
255-
python -c "
256-
import commit_reveal
257-
import inspect
258-
259-
# Check that all public functions have docstrings
260-
for name in dir(commit_reveal.CommitRevealScheme):
261-
if not name.startswith('_'):
262-
method = getattr(commit_reveal.CommitRevealScheme, name)
263-
if callable(method) and not method.__doc__:
264-
raise ValueError(f'Method {name} missing docstring')
265-
print('All public methods have docstrings')
266-
"
267-
268-
- name: Generate API documentation
252+
- name: Build documentation
269253
run: |
270-
mkdir -p docs/api
271-
python -c "
272-
import commit_reveal
273-
import inspect
274-
275-
# Generate simple API docs
276-
with open('docs/api/api.md', 'w') as f:
277-
f.write('# API Documentation\\n\\n')
278-
f.write('## CommitRevealScheme\\n\\n')
279-
for name in dir(commit_reveal.CommitRevealScheme):
280-
if not name.startswith('_'):
281-
method = getattr(commit_reveal.CommitRevealScheme, name)
282-
if callable(method):
283-
f.write(f'### {name}\\n\\n')
284-
if method.__doc__:
285-
f.write(method.__doc__)
286-
f.write('\\n\\n')
287-
"
288-
289-
- name: Upload documentation
290-
uses: actions/upload-artifact@v3
291-
with:
292-
name: documentation
293-
path: docs/
254+
poetry run mkdocs build --strict
294255
295256
build:
296257
name: Build Package

0 commit comments

Comments
 (0)