Python documentation #292
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: Python documentation | |
# This action works with pull requests and pushes | |
on: | |
workflow_run: | |
workflows: ["Styx compile"] | |
types: | |
- completed | |
jobs: | |
pdoc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version-file: python/pyproject.toml | |
- name: Install niwrap | |
run: | | |
cd python | |
poetry install | |
poetry add pdoc | |
- name: Set up Git | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "GitHub Actions" | |
- name: Compile | |
run: | | |
cd python | |
poetry run pdoc niwrap -o docs_build -t docs/pdoc-theme --docformat google --no-search | |
touch docs_build/.nojekyll | |
- uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: python/docs_build |