Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hopefully fix API docs #174

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:[email protected]/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:[email protected]/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
Loading