Skip to content

Commit

Permalink
add initial docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayThorve committed Jan 19, 2023
1 parent 03e5dcc commit 48f0814
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ jobs:
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
docs-build:
if: ${{ startsWith(github.ref, 'refs/heads/branch-') }}
needs: [conda-python-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-118
with:
build_type: branch
node_type: "gpu-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
upload-conda:
needs: [conda-python-build]
secrets: inherit
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- checks
- conda-python-build
- conda-python-tests
- docs-build
- wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@cuda-118
Expand All @@ -33,6 +34,16 @@ jobs:
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-118
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-118
with:
build_type: pull-request
node_type: "gpu-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
wheel-build:
needs: checks
runs-on: ubuntu-latest
Expand Down
38 changes: 38 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -euo pipefail

rapids-logger "Create test conda environment"
. /opt/conda/etc/profile.d/conda.sh

rapids-dependency-file-generator \
--output conda \
--file_key docs \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n docs
conda activate docs

rapids-print-env

rapids-logger "Downloading artifacts from previous jobs"

PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
VERSION_NUMBER=$(rapids-get-rapids-version-from-git)

rapids-mamba-retry install \
--channel "${PYTHON_CHANNEL}" \
dask-cuda

# Build Python docs
rapids-logger "Build Python docs"
pushd docs
sphinx-build -b dirhtml ./source _html
sphinx-build -b text ./source _text
popd

if [[ "${RAPIDS_BUILD_TYPE}" == "branch" ]]; then
rapids-logger "Upload Docs to S3"
aws s3 sync --no-progress --delete docs/_html "s3://rapidsai-docs/dask-cuda/${VERSION_NUMBER}/html"
aws s3 sync --no-progress --delete docs/_text "s3://rapidsai-docs/dask-cuda/${VERSION_NUMBER}/txt"
fi
15 changes: 15 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ files:
- build_python
- cudatoolkit
- develop
- docs
- py_version
- run_python
- test_python
Expand All @@ -20,6 +21,12 @@ files:
includes:
- develop
- py_version
docs:
output: none
includes:
- cudatoolkit
- docs
- py_version
channels:
- rapidsai
- rapidsai-nightly
Expand Down Expand Up @@ -57,6 +64,14 @@ dependencies:
- output_types: [conda, requirements]
packages:
- pre-commit
docs:
common:
- output_types: [conda, requirements]
packages:
- numpydoc
- sphinx
- sphinx-click
- sphinx_rtd_theme
py_version:
specific:
- output_types: conda
Expand Down

0 comments on commit 48f0814

Please sign in to comment.