Skip to content

Commit 44ec68d

Browse files
authored
Merge pull request #167 from wangnuannuan/jingru-add-action-workflow-for-osp
add action workflow for osp
2 parents f4f0429 + 9577413 commit 44ec68d

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/workflows/doc-build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Documentation Build and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
paths:
9+
- 'doc/**'
10+
- '**.rst'
11+
- '**.md'
12+
- '.github/workflows/doc-build.yml'
13+
14+
jobs:
15+
doc-build-html:
16+
name: "Documentation Build (HTML)"
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: checkout
21+
uses: actions/checkout@v2
22+
23+
- name: install-pkgs
24+
run: |
25+
sudo apt-get install -y doxygen
26+
27+
- name: cache-pip
28+
uses: actions/cache@v2
29+
with:
30+
path: ~/.cache/pip
31+
key: pip-${{ hashFiles('scripts/requirements_doc.txt') }}
32+
33+
- name: install-pip
34+
run: |
35+
sudo pip3 install -U setuptools wheel pip
36+
pip3 install -r scripts/requirements_doc.txt
37+
38+
39+
- name: build-docs
40+
run: |
41+
ln -s example doc/documents/example/example
42+
mkdir -p doc/build/doxygen/xml
43+
44+
SPHINXOPTS="-q -W -j auto" make -C doc doxygen
45+
SPHINXOPTS="-q -W -j auto" make -C doc html
46+
rm -rf doc/build/doctrees
47+
48+
- name: Deploy
49+
uses: JamesIves/github-pages-deploy-action@4.1.5
50+
with:
51+
branch: gh-pages
52+
folder: doc/build
53+
target-folder: doc/build

scripts/requirements_doc.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# DOC: used to generate docs
2+
3+
breathe~=4.23,!=4.29.0
4+
sphinx~=3.3
5+
sphinx_rtd_theme>=0.5.2,<1.0
6+
sphinx-tabs
7+
sphinxcontrib-svg2pdfconverter
8+
sphinx-notfound-page>=0.6

0 commit comments

Comments
 (0)