-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild_sphinx.sh
More file actions
executable file
·28 lines (22 loc) · 773 Bytes
/
build_sphinx.sh
File metadata and controls
executable file
·28 lines (22 loc) · 773 Bytes
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
#!/usr/bin/env bash
# Build sphinx documentation
set -e
# get group id to use it in the docker
GID=$(id -g)
# create image
docker build --build-arg "USER_UID=$UID" --build-arg "USER_GID=$GID" --tag 'sphinx-builder' -f scripts/Dockerfile.sphinx .
# ensure dest dir
mkdir -p gh_pages/sphinx
# use image to generate documentation
docker run --rm --user user \
-v $(pwd)/scripts/sphinx:/docs \
-v $(pwd)/docs/sphinx:/docs/source \
-v $(pwd)/app:/docs/app \
-v $(pwd)/gh_pages/sphinx:/docs/build \
-e PYTHONPATH=/docs/ \
-e SPHINXOPTS="--fail-on-warning --keep-going --fresh-env" \
sphinx-builder make html
# move to the right place and cleanup
rm -rf gh_pages/devs/ref-python || true
mv gh_pages/sphinx/html gh_pages/devs/ref-python
rm -rf gh_pages/sphinx/