Skip to content

Commit

Permalink
Get API docs building on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aragilar committed Jul 11, 2024
1 parent 5e3b0b0 commit 7051b9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-overall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
run: |
cat sundials_env.sh
source sundials_env.sh &&
env &&
env | sort &&
tox
env:
TOXENV: ${{ matrix.tox-env }}
8 changes: 4 additions & 4 deletions upload_api_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

set -e

if [ "$TRAVIS_REPO_SLUG" = "bmcage/odes" -o "$DOCTR_DEPLOY" ]; then
if [ "$GITHUB_REPOSITORY" = "bmcage/odes" ] && [ "$DOCTR_DEPLOY" ]; then
deploy="true"
else
deploy="false"
fi


if [ -z "$TRAVIS_TAG" ]; then
if [ "tag" = "$GITHUB_REF_TYPE" ]; then
DEPLOY_DIR=dev;
else
DEPLOY_DIR="version-$TRAVIS_TAG";
DEPLOY_DIR="version-$GITHUB_REF_NAME";
fi

make -C apidocs html

if [ $deploy = "true" ]; then
doctr deploy --no-require-master --build-tags --command "$VIRTUAL_ENV/bin/python build_index.py" --built-docs apidocs/_build/html $DEPLOY_DIR
doctr deploy --no-require-master --build-tags --command "$VIRTUAL_ENV/bin/python build_index.py" --built-docs apidocs/_build/html "$DEPLOY_DIR"
else
echo 'Not deploying docs, set DOCTR_DEPLOY to do deployment of docs'
fi

0 comments on commit 7051b9a

Please sign in to comment.