Skip to content

Commit

Permalink
Merge pull request #174 from aragilar/fix-api-docs
Browse files Browse the repository at this point in the history
Hopefully fix API docs
  • Loading branch information
aragilar authored Jul 11, 2024
2 parents 2279627 + 43c3685 commit 0b1b27a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-overall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,4 @@ jobs:
tox
env:
TOXENV: ${{ matrix.tox-env }}
UPLOAD_SCIKITS_ODES_API_DOCS: ${{ github.repository == 'bmcage/odes' && 'true' || 'false' }}
34 changes: 19 additions & 15 deletions apidocs/upload_api_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@

set -ex

# Clone gh-pages
git clone --branch gh-pages https://github.com/bmcage/odes gh-pages
# Run rsync
branch_name="$GITHUB_REF_NAME"
rsync -av --delete "$API_DOCS_OUT_DIR" "./gh-pages/$branch_name/"
# Run docs-versions-menu
cd gh-pages
docs-versions-menu
# Commit and push
git config user.name github-actions
git config user.email [email protected]
git add -A --verbose
git status
git commit --verbose -m "Auto-update from Github Actions Workflow" -m "Deployed from commit ${GITHUB_SHA} (${GITHUB_REF})"
git push --verbose --force "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/bmcage" gh-pages
if [ "true" = "$UPLOAD_SCIKITS_ODES_API_DOCS" ]; then
# Clone gh-pages
git clone --branch gh-pages https://github.com/bmcage/odes gh-pages
# Run rsync
branch_name="$GITHUB_REF_NAME"
rsync -av --delete "$API_DOCS_OUT_DIR" "./gh-pages/$branch_name/"
# Run docs-versions-menu
cd gh-pages
docs-versions-menu
# Commit and push
git config user.name github-actions
git config user.email [email protected]
git add -A --verbose
git status
git commit --verbose -m "Auto-update from Github Actions Workflow" -m "Deployed from commit ${GITHUB_SHA} (${GITHUB_REF})"
git push --verbose --force "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/bmcage" gh-pages
else
echo "Skipping upload of API docs"
fi
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deps=
-rapidocs/requirements.txt
commands=
sphinx-build -W -b html -d {envtmpdir}/doctrees . {env:API_DOCS_OUT_DIR}
upload: ./upload_api_docs.sh
./upload_api_docs.sh
changedir=apidocs

[testenv:docs]
Expand Down

0 comments on commit 0b1b27a

Please sign in to comment.