microsoft/onnxruntime-extensions

Public

mirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
snnn-patch-1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/publish-python-apidocs.yml

58lines · modeblame

d39e8444Sayan Shaw2 years ago1name: Publish Python API Docs
2
3# Run when the Python API changes or every month so that the artifact does not expire
4on:
5push:
6branches:
7- main
8paths:
9- onnxruntime_extensions/**
10- docs/python/**
11schedule:
12- cron: '0 0 1 * *'
13workflow_dispatch:
14
15concurrency:
16group: "apidocs-python"
17cancel-in-progress: true
18
19permissions:
20contents: write
21
22jobs:
23build:
24name: Generate Python API docs
25runs-on: ubuntu-latest
26steps:
27- uses: actions/checkout@v3
28- name: Install tools
29run: |
30sudo apt-get update
31sudo apt-get install python3-pip
32- name: Install dependencies
33run: |
34python3 -m pip install --upgrade pip
35python3 -m pip install -r requirements-dev.txt
36python3 -m pip install -e .
37python3 -m pip list
38- name: Generate Python docs with Sphinx
39run: |
40set -e -x
41python3 -m pip install -r docs/python/requirements.txt
42rm -rf sphinx_output/docs/
43python3 -m sphinx -j1 -v -T -b html -d sphinx_output/docs/extensions/_doctrees/html docs/python/ sphinx_output/docs/extensions/html
44- name: Log source commit
45run: |
46mkdir -p sphinx_output/docs/extensions/html/
47git rev-parse --short HEAD >> sphinx_output/docs/extensions/html/source-version.txt
48- name: Move Python docs into site
49run: |
50rm -rf _site/docs/api/python
51mkdir -p _site/docs/api/
52mv sphinx_output/docs/extensions/html _site/docs/api/python
53- name: Upload docs artifact
54uses: actions/upload-artifact@v3
55with:
56name: onnxruntime-extensions-python-apidocs
57path: _site
58retention-days: 60