Release 1.1.0 #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" | |