feat: automate docs generation. (#710) #4
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: Generate API docs | ||
| on: | ||
| push: | ||
| branches: | ||
| - development | ||
| jobs: | ||
| build-docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install pydoc-markdown | ||
| - name: Run pydoc-markdown | ||
| working-directory: . | ||
| run: | | ||
| pydoc-markdown pydoc-markdown.yml | ||
| - name: Create Pull Request if docs changed | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| branch: docs/regenerate-api-docs | ||
| commit-message: chore(docs): regenerate API docs | ||
| title: chore(docs): regenerate API docs | ||
| body: | | ||
| This PR was automatically generated by the workflow to regenerate the API documentation. | ||
| add-paths: | | ||
| docs/api-reference/python/** | ||
| delete-branch: true | ||