-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (42 loc) · 1.75 KB
/
Copy pathpython-docs.yml
File metadata and controls
54 lines (42 loc) · 1.75 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
48
49
50
51
52
53
# This workflow will upload a Python Package to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload documentation on GitHub Pages
on:
release:
types: [published]
permissions:
contents: write
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Build release distributions
run: |
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade wheel pip setuptools
python -m pip install --upgrade pydoctor
- name: Generate API documentation with pydoctor
run: |
pydoctor \
--project-name="dobotWrapperPy" \
--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="./apidocs" \
--docformat="google" \
--intersphinx="https://docs.python.org/3/objects.inv" \
./dobotWrapperPy
- name: Push API documentation to Github Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apidocs
commit_message: "Generate API documentation"