Skip to content

Commit

Permalink
use rapids-upload-docs script (#1181)
Browse files Browse the repository at this point in the history
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1181
  • Loading branch information
AyodeAwe authored Jun 7, 2023
1 parent 0c395d1 commit 400b310
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,30 @@ rapids-print-env
rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
VERSION_NUMBER="23.08"

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
libcuspatial \
cuspatial

rapids-logger "Build Doxygen docs"
export RAPIDS_VERSION_NUMBER="23.08"
export RAPIDS_DOCS_DIR="$(mktemp -d)"

rapids-logger "Build CPP docs"
pushd cpp/doxygen
doxygen Doxyfile
mkdir -p "${RAPIDS_DOCS_DIR}/libcuspatial/html"
mv html/* "${RAPIDS_DOCS_DIR}/libcuspatial/html"
popd

rapids-logger "Build Sphinx docs"
rapids-logger "Build Python docs"
pushd docs
sphinx-build -b dirhtml source _html -W
sphinx-build -b text source _text -W
mkdir -p "${RAPIDS_DOCS_DIR}/cuspatial/"{html,txt}
mv _html/* "${RAPIDS_DOCS_DIR}/cuspatial/html"
mv _text/* "${RAPIDS_DOCS_DIR}/cuspatial/txt"
popd


if [[ ${RAPIDS_BUILD_TYPE} != "pull-request" ]]; then
rapids-logger "Upload Docs to S3"
aws s3 sync --no-progress --delete docs/_html "s3://rapidsai-docs/cuspatial/${VERSION_NUMBER}/html"
aws s3 sync --no-progress --delete docs/_text "s3://rapidsai-docs/cuspatial/${VERSION_NUMBER}/txt"
aws s3 sync --no-progress --delete cpp/doxygen/html "s3://rapidsai-docs/libcuspatial/${VERSION_NUMBER}/html"
fi
rapids-upload-docs
2 changes: 1 addition & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sed_runner "/TAGFILES/ s|[0-9]\+.[0-9]\+|${NEXT_SHORT_TAG}|g" cpp/doxygen/Doxyfi
for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"
done
sed_runner "s/VERSION_NUMBER=\".*/VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh
sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh

# Need to distutils-normalize the original version
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))")
Expand Down

0 comments on commit 400b310

Please sign in to comment.