Skip to content

Commit e2bae61

Browse files
committed
rtd update
1 parent e1d8a3b commit e2bae61

3 files changed

Lines changed: 42 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ jobs:
139139
./bin/build.sh
140140
141141
142-
# test-docs:
142+
test-docs:
143143

144-
# needs: [ test-minimal-python ]
145-
# runs-on: ubuntu-latest
144+
needs: [ test-minimal-python ]
145+
runs-on: ubuntu-latest
146146

147-
# steps:
148-
# - uses: actions/checkout@v4
147+
steps:
148+
- uses: actions/checkout@v4
149149

150-
# - name: Test building docs
151-
# run: |
152-
# # cd docs && ./docker.sh
150+
- name: Test building docs
151+
run: |
152+
# cd docs && ./docker.sh
153153
154154
155155
# test-readme:

docs/build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
EXCLUDES="../setup.py
5+
echo "SKIPPING " $EXCLUDES
6+
sphinx-apidoc -o source .. $EXCLUDES
7+
8+
make clean
9+
make html SPHINXOPTS="-W --keep-going -n"
10+
make latexpdf SPHINXOPTS="-W --keep-going -n"
11+
make epub SPHINXOPTS="-W --keep-going -n"
12+
13+
PLATFORM=`uname`
14+
if [[ "$PLATFORM" == "Darwin" ]]
15+
then
16+
echo "Opening in Darwin.."
17+
open build/html/index.html
18+
fi

docs/docker.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
mkdir -p build
5+
6+
RUN_INSTALLS="(cp -r /data /cu_cat && cd /cu_cat && python -m pip install -e .[docs,build] )"
7+
RUN_SPHINX="cd /data/docs && ./build.sh || ( echo 'Printing /tmp/sphinx*' && ( cat /tmp/sphinx* || echo no err_file ) && exit 1 )"
8+
9+
#TODO make a docker layer so we can cache RUN_INSTALLS
10+
docker run \
11+
--entrypoint=/bin/bash \
12+
--rm \
13+
-e USER_ID=$UID \
14+
-v $(pwd)/..:/data \
15+
ddidier/sphinx-doc:3.4.3-1 \
16+
-c "${RUN_INSTALLS} && ${RUN_SPHINX}"

0 commit comments

Comments
 (0)