forked from microsoft/AirSim
-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (36 loc) · 1.32 KB
/
test_docs.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
name: Documentation Build & Deploy
# Controls when the action will run.
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
architecture: 'x64'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install mkdocs pymdown-extensions # Mkdocs requirements
- name: Build API reference docs
run: |
python3 -m venv .env # Virtual env to avoid dep. issues
source .env/bin/activate
pip install Sphinx sphinx_rtd_theme numpy msgpack-rpc-python
pushd PythonClient >/dev/null
./build_api_docs.sh
popd >/dev/null
cp -r PythonClient/docs/_build docs/api_docs/ # Copy generated files
deactivate
- name: Build AirSim Documentation
run: ./build_docs.sh
# Only on commits to 'master' branch
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build_docs