Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/CI-api-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: apidocs
on:
- push

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install requirements for documentation generation
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install docutils pydoctor

- name: Generate API documentation with pydoctor
run: |
# Run pydoctor build
pydoctor \
--project-name=RunPod \
--project-version=${{ github.ref_name }} \
--project-url=https://github.com/$GITHUB_REPOSITORY \
--html-viewsource-base=https://github.com/$GITHUB_REPOSITORY/tree/$GITHUB_SHA \
--make-html \
--html-output=./docs/api \
--project-base-dir="." \
--docformat=restructuredtext \
--intersphinx=https://docs.python.org/3/objects.inv \
./runpod

- name: Push API documentation to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/api
commit_message: "Generate API documentation"
Loading