Skip to content

Commit

Permalink
Add message about viewing docs locally to rapids-upload-docs (#58)
Browse files Browse the repository at this point in the history
As noted in rapidsai/rmm#1288, the value of
`RAPIDS_DOCS_DIR` is random and generated by `mktemp -d`.

Therefore, it will be useful to print out this directory for users who
are doing local builds according to the repro instructions here:
https://docs.rapids.ai/resources/reproducing-ci/.

Additionally, a `python -m http.server` command is printed so that users
can view the built docs in their browser.
  • Loading branch information
ajschmidt8 authored Jun 5, 2023
1 parent c9fded7 commit 835ba93
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tools/rapids-upload-docs
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/bin/bash
# This script uploads RAPIDS docs to S3.
# The docs are expected to be in the following directory structure:
# $RAPIDS_DOCS_DIR
# ├── cudf
# │ ├── html
# │ │ └── <html files>
# │ └── txt
# │ └── <txt files>
# └── dask-cudf
# ├── html
# │ └── <html files>
# └── txt
# └── <txt files>
# Required Environment Variables:
# - RAPIDS_DOCS_DIR - a path to a directory containing the docs to upload
# - RAPIDS_VERSION_NUMBER - the version number of the docs being uploaded
set -euo pipefail

checks() {
Expand All @@ -9,6 +25,9 @@ checks() {

if [[ "${GITHUB_ACTIONS:-false}" != "true" ]]; then
echo "Uploading docs from local builds is not supported."
echo "The docs are in ${RAPIDS_DOCS_DIR}."
echo "They can be viewed in a web browser by running:"
echo "python -m http.server --directory ${RAPIDS_DOCS_DIR}"
exit 0
fi

Expand Down

0 comments on commit 835ba93

Please sign in to comment.