-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (40 loc) · 1.36 KB
/
docs.yml
File metadata and controls
47 lines (40 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: apidocs
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install requirements for documentation generation
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install pydoctor
- name: Generate documentation with pydoctor
run: |
# Run pydoctor build
pydoctor \
--project-name='KeyFactor API Client V1' \
--project-url=https://github.com/$GITHUB_REPOSITORY \
--html-viewsource-base=https://github.com/$GITHUB_REPOSITORY/tree/$GITHUB_SHA \
--html-base-url=https://$GITHUB_REPOSITORY_OWNER.github.io/${GITHUB_REPOSITORY#*/} \
--html-output=./www \
--docformat=google \
--intersphinx=https://docs.python.org/3/objects.inv \
./kfclient/keyfactor_v_1_client
- name: Push API documentation to Github Pages (if on main branch)
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./www
commit_message: "Generate documentation"