Skip to content

Commit

Permalink
Fixup docs publish job (#850)
Browse files Browse the repository at this point in the history
This commit fixes two separate issues in the docs publishing job. The
first is a failure that happens in the docs deployment on releases.
The IFS (internal field separator) variable was getting set too broadly
at the the level of the entire script instead of just the tag parsing.
This was causing the passing of the secrets for decrypting the
credential files to fail. This commit updates the IFS usage so it's not
affecting the other commands after we split the tag version.

The second change is updating the default sphinx-build invocation to
include the -d flag to change the default output directory for the
.doctrees dir.
(see: https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-d
for details on the flag). The .doctrees dir is a local cache of pickle
files for parsed source files and doesn't need to be included in the
build. By moving the default location for this outside our html build dir
this will remove a lot of overhead from our uploaded docs as this cache
can end up being quite large.
  • Loading branch information
mtreinish authored Mar 30, 2023
1 parent 4c31946 commit a63042b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/deploy_documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ echo "show current dir: "
pwd

CURRENT_TAG=`git describe --abbrev=0`
IFS='.'
read -ra VERSION <<< "$CURRENT_TAG"
IFS=. read -ra VERSION <<< "$CURRENT_TAG"
STABLE_VERSION=${VERSION[0]}.${VERSION[1]}
echo "Building for stable version $STABLE_VERSION"

# Push to qiskit.org/ecosystem
openssl aes-256-cbc -K $encrypted_rclone_key -iv $encrypted_rclone_iv -in tools/rclone.conf.enc -out $RCLONE_CONFIG_PATH -d
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ changedir = {toxinidir}/docs
commands =
python -m ipykernel install --user
jupyter kernelspec list
sphinx-build -W -b html source build/html {posargs}
sphinx-build -W -d {toxinidir}/docs/build/.doctrees -b html source build/html {posargs}

[testenv:black]
basepython = python3
Expand Down

0 comments on commit a63042b

Please sign in to comment.