pypi workflow #45
This file contains 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
name: Deploy API Documentation | |
on: | |
push: | |
branches: | |
- main # or your primary branch | |
jobs: | |
deploy-docs: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Checkout the repository. | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# 2. Set up Python. | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
# 3. Install pydoctor. | |
- name: Install pdoc | |
run: | | |
#pip install pydoctor | |
pip install . # Install deps | |
pip install pdoc | |
# 4. Build the API documentation using pydoctor. | |
# This command tells pydoctor to generate HTML docs in docs/api for the module tensorgrad. | |
- name: Build API Documentation with Pdoc | |
run: | | |
# pydoctor --html-output=docs/api tensorgrad/ | |
pdoc tensorgrad -o docs/api | |
- name: Deploy API Documentation to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/api | |
publish_branch: gh-pages | |
destination_dir: docs/api |