diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index abec04ac..b5da7dbb 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -23,6 +23,25 @@ jobs: with: name: conda_artifacts path: ${{ env.OUTPUT_DIR }} + docs-build: + if: github.ref_type == 'branch' + needs: conda + runs-on: ubuntu-latest + container: rapidsai/ci-conda:latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + - uses: actions/download-artifact@v4 + with: + name: conda_artifacts + path: artifacts-channel + - run: ./ci/build_docs.sh + - uses: actions/upload-artifact@v4 + with: + name: docs_artifacts + path: ${{ env.OUTPUT_DIR }} wheel: runs-on: ubuntu-latest container: python:3 diff --git a/ci/build_docs.sh b/ci/build_docs.sh new file mode 100755 index 00000000..c195025f --- /dev/null +++ b/ci/build_docs.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright (c) 2023-2024, NVIDIA CORPORATION. + +set -euo pipefail + +rapids-logger "Create test conda environment" +. /opt/conda/etc/profile.d/conda.sh + +ENV_YAML_DIR="$(mktemp -d)" + +rapids-dependency-file-generator \ + --output conda \ + --file_key docs \ + --matrix "" | tee "${ENV_YAML_DIR}/env.yaml" + +rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n docs +conda activate docs + +rapids-print-env + +rapids-mamba-retry install \ + --channel "file://$(pwd)/artifacts-channel" \ + rapids-dependency-file-generator + +rapids-logger "Build rapids-dependency-file-generator Sphinx docs" +pushd docs +make dirhtml +mkdir -p "${OUTPUT_DIR}/rapids-dependency-file-generator/html" +mv build/dirhtml/* "${OUTPUT_DIR}/rapids-dependency-file-generator/html" +make text +mkdir -p "${OUTPUT_DIR}/rapids-dependency-file-generator/txt" +mv build/text/* "${OUTPUT_DIR}/rapids-dependency-file-generator/txt" +popd diff --git a/dependencies.yaml b/dependencies.yaml new file mode 100644 index 00000000..214f50b7 --- /dev/null +++ b/dependencies.yaml @@ -0,0 +1,14 @@ +files: + docs: + output: none + includes: + - docs +dependencies: + docs: + common: + - output_types: [conda] + packages: + - make + - numpydoc + - pydata-sphinx-theme + - sphinx diff --git a/docs/source/conf.py b/docs/source/conf.py index e10cadb3..75e9aa91 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -51,8 +51,6 @@ "navbar_align": "right", } -html_static_path = ["_static"] - # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"]