Skip to content

Generate documentation #1

Generate documentation

Generate documentation #1

Workflow file for this run

name: docs
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install requirements for documentation generation
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install pydoctor
- name: Generate documentation
run: |
# Run pydoctor build
pydoctor \
--project-name='Gast, Beniget!' \
--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=./apidocs \
--docformat=restructuredtext \
--intersphinx=https://docs.python.org/3/objects.inv \
./beniget
- name: Push API documentation to Github Pages
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apidocs
commit_message: "Generate API documentation"