diff --git a/.github/workflows/apidocs.yml b/.github/workflows/apidocs.yml new file mode 100644 index 0000000..b8f6a04 --- /dev/null +++ b/.github/workflows/apidocs.yml @@ -0,0 +1,31 @@ +name: apidocs + +on: + push: + branches: [ master ] + tags: + - '*' + +jobs: + deploy: + runs-on: macos-latest + + steps: + - uses: actions/checkout@master + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install requirements for documentation generation + run: python -m pip install --upgrade pip setuptools wheel tox + + - name: Generate API documentation with pydoctor + run: tox -e apidocs + + - name: Push API documentation to Github Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./apidocs + commit_message: "Generate API documentation"