forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.49 KB
/
publish-python-apidocs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Update Python API Docs
on:
workflow_dispatch
jobs:
publish:
name: Generate Python API docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install tools
run: |
sudo apt update
sudo apt-get install pip
sudo apt-get install graphviz
- name: Install dependencies
run: |
cd docs/python
pip install -r requirements.txt
pip install flatbuffers protobuf==3.19.1
pip install -i https://test.pypi.org/simple/ ort-nightly
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)"
- name: Check outputs
run: echo ${{ steps.vars.outputs.sha_short }}
- uses: actions/checkout@v2
with:
ref: gh-pages
clean: false
- name: Move API docs into target area
run: |
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