name: Update Python API Docs on: push: branches: - main workflow_dispatch: jobs: publish: name: Generate Python API docs runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install tools run: | sudo apt-get update sudo apt-get install python3-pip sudo apt-get install graphviz - name: Install dependencies run: | python3 -m pip install --upgrade pip cd docs/python python3 -m pip install -r requirements.txt python3 -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly python3 -m pip list - name: Generate Python docs with Sphinx run: | cd tools/doc ./builddoc.sh /usr/bin ../.. ../../build - name: Set vars id: vars run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - uses: actions/checkout@v2 with: ref: gh-pages clean: false - name: Move API docs into target area run: | ls docs/api rm -rf docs/api/python mv build/docs/inference/html docs/api/python - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: branch: gh-pages-pr-python-docs base: gh-pages title: '[Automated]: Update Python API docs' commit-message: 'Update Python API docs to commit ${{ steps.vars.outputs.sha_short }}' add-paths: docs/api/python