Fix PyPI workflow trigger to match correct workflow name #66
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
| 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@v4 | |
| # 2. Install uv | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| # 3. Set up Python. | |
| - name: Set up Python 3.13 | |
| run: uv python install 3.13 | |
| # 4. Install dependencies | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| uv add pdoc | |
| # 5. Build the API documentation using pdoc. | |
| # This command tells pdoc to generate HTML docs in docs/api for the module tensorgrad. | |
| - name: Build API Documentation with Pdoc | |
| run: | | |
| uv run 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 |