From 051695b8f84a033baeedb01083735e576574e447 Mon Sep 17 00:00:00 2001 From: Jake Awe <50372925+AyodeAwe@users.noreply.github.com> Date: Wed, 7 Jun 2023 18:42:48 -0500 Subject: [PATCH] use rapids-upload-docs script (#5457) This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](https://github.com/rapidsai/gha-tools/pull/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: https://github.com/rapidsai/cuml/pull/5457 --- ci/build_docs.sh | 21 +++++++++++---------- ci/release/update-version.sh | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ci/build_docs.sh b/ci/build_docs.sh index a8682c3742..b8036a5ec8 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -18,29 +18,30 @@ 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}" \ cuml libcuml -# # Build CPP docs -rapids-logger "Build cpp docs" +export RAPIDS_VERSION_NUMBER="23.08" +export RAPIDS_DOCS_DIR="$(mktemp -d)" + +rapids-logger "Build CPP docs" pushd cpp doxygen Doxyfile.in +mkdir -p "${RAPIDS_DOCS_DIR}/libcuml/html" +mv html/* "${RAPIDS_DOCS_DIR}/libcuml/html" popd -# Build Python 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}/cuml/"{html,txt} +mv _html/* "${RAPIDS_DOCS_DIR}/cuml/html" +mv _text/* "${RAPIDS_DOCS_DIR}/cuml/txt" popd -if [[ "${RAPIDS_BUILD_TYPE}" != "pull-request" ]]; then - rapids-logger "Upload Docs to S3" - aws s3 sync --no-progress --delete cpp/html "s3://rapidsai-docs/libcuml/${VERSION_NUMBER}/html" - aws s3 sync --no-progress --delete docs/_html "s3://rapidsai-docs/cuml/${VERSION_NUMBER}/html" - aws s3 sync --no-progress --delete docs/_text "s3://rapidsai-docs/cuml/${VERSION_NUMBER}/txt" -fi +rapids-upload-docs + diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 9ad7108d8c..b9498e28f3 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -92,4 +92,4 @@ done 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