Skip to content

Commit

Permalink
rtd update
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolinmorgan committed Feb 7, 2024
1 parent e1d8a3b commit e2bae61
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,17 @@ jobs:
./bin/build.sh
# test-docs:
test-docs:

# needs: [ test-minimal-python ]
# runs-on: ubuntu-latest
needs: [ test-minimal-python ]
runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v4
steps:
- uses: actions/checkout@v4

# - name: Test building docs
# run: |
# # cd docs && ./docker.sh
- name: Test building docs
run: |
# cd docs && ./docker.sh
# test-readme:
Expand Down
18 changes: 18 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -ex

EXCLUDES="../setup.py
echo "SKIPPING " $EXCLUDES
sphinx-apidoc -o source .. $EXCLUDES
make clean
make html SPHINXOPTS="-W --keep-going -n"
make latexpdf SPHINXOPTS="-W --keep-going -n"
make epub SPHINXOPTS="-W --keep-going -n"
PLATFORM=`uname`
if [[ "$PLATFORM" == "Darwin" ]]
then
echo "Opening in Darwin.."
open build/html/index.html
fi
16 changes: 16 additions & 0 deletions docs/docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -ex

mkdir -p build

RUN_INSTALLS="(cp -r /data /cu_cat && cd /cu_cat && python -m pip install -e .[docs,build] )"
RUN_SPHINX="cd /data/docs && ./build.sh || ( echo 'Printing /tmp/sphinx*' && ( cat /tmp/sphinx* || echo no err_file ) && exit 1 )"

#TODO make a docker layer so we can cache RUN_INSTALLS
docker run \
--entrypoint=/bin/bash \
--rm \
-e USER_ID=$UID \
-v $(pwd)/..:/data \
ddidier/sphinx-doc:3.4.3-1 \
-c "${RUN_INSTALLS} && ${RUN_SPHINX}"

0 comments on commit e2bae61

Please sign in to comment.