Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
33 changes: 32 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,38 @@ jobs:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
- run: pipx run 'codespell[toml]' **/*.py **/*.txt --skip="venv/lib/python3*"


docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install requirements
run: |
python -m pip install -U pip setuptools wheel
python -m pip install pydoctor
- name: Run pydoctor
run: |
# Do not consider exit code 2 as a real error
trap 'if [[ "$?" == "2" ]]; then exit 0; fi' EXIT
# Run pydoctor
pydoctor \
--project-url=https://github.com/$GITHUB_REPOSITORY \
--html-viewsource-base=https://github.com/$GITHUB_REPOSITORY/tree/$GITHUB_SHA \
--html-base-url=https://$GITHUB_REPOSITORY_OWNER.github.io/${GITHUB_REPOSITORY#*/} \
--html-output=./www \
fluidsynth.py
- if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./www
commit_message: "Generate API documentation"

ci:
needs: [codespell_and_ruff]
strategy:
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,8 @@ lint.per-file-ignores."__init__.py" = [ "E402" ]
lint.per-file-ignores."test/*" = [ "S101" ]
lint.pylint.allow-magic-value-types = [ "int", "str" ]
lint.pylint.max-args = 8

[tool.pydoctor]
intersphinx = ["https://docs.python.org/3/objects.inv"]
docformat = "restructuredtext"
verbose = 1
Loading