Skip to content

Commit a6fb7e8

Browse files
docs: add pdoc
1 parent 298aa9e commit a6fb7e8

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.github/CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ Install the package:
172172
pip install --index-url https://test.pypi.org/simple/ --no-deps python_cli_template
173173
```
174174

175+
Generate [docs](https://pdoc.dev/):
176+
177+
```sh
178+
pdoc src/python_cli_template/
179+
```
180+
175181
## Release
176182

177183
Release and publish are automated with [Release Please](https://github.com/googleapis/release-please).

.github/workflows/build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: build
22
on: [push, pull_request]
33

44
permissions:
5-
contents: read
5+
contents: write
66

77
jobs:
88
build:
@@ -22,3 +22,12 @@ jobs:
2222

2323
- name: Generate packages
2424
run: python3 -m build
25+
26+
- name: Build docs
27+
run: pdoc src/python_cli_template/ -o docs
28+
29+
- name: Deploy
30+
if: github.ref_name == 'master'
31+
uses: remarkablemark/gitploy-action@v1
32+
with:
33+
directory: docs

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ python_cli_template = "python_cli_template.cli:main"
2424
[project.optional-dependencies]
2525
build = [
2626
"build==1.2.2.post1",
27+
"pdoc==15.0.1",
2728
"twine==6.1.0",
2829
]
2930
test = [

src/python_cli_template/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
"""Python CLI Template"""
1+
"""
2+
Python CLI Template
3+
4+
.. include:: ../../README.md
5+
"""
26

37
from .template import hello
48

0 commit comments

Comments
 (0)