-
Notifications
You must be signed in to change notification settings - Fork 52
46 lines (45 loc) · 1.72 KB
/
doc-automation.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
# This action is based on the automation in pytorch/serve. Edit as appropriate
# TODO: Uncomment this when the automation should run on commits to main
#on:
# push:
# branches:
# - main
# TODO: Comment or delete this whole section when automation should run on commits to main
on:
workflow_dispatch:
jobs:
build_docs_job:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Dependencies
run: |
echo `python3 --version`
sudo apt-get install -y python-setuptools
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade protobuf
python3 -m pip install -U sphinx
python3 -m pip install setuptools
python3 -m pip install torch
python3 -m pip install -e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
python3 -m pip install recommonmark
python3 -m pip install katex
python3 -m pip install sphinxcontrib.katex
python3 -m pip install sphinx_markdown_tables
python3 -m pip install --pre onnxruntime-training -f https://download.onnxruntime.ai/onnxruntime_nightly_cpu.html
python3 -m pip install torch-ort
python3 -m torch_ort.configure
- name: Build the docset
run: cd ./docs/sphinx ; export PATH=$PATH:$(python3 -m site --user-base)/bin/ ; make html
id: build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/sphinx/build/html
CLEAN_EXCLUDE: '["_config.yml"]'