Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Build docs #78

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
19 changes: 19 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 33 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
files:
docs:
output: none
includes:
- docs
dependencies:
docs:
common:
- output_types: [conda]
packages:
- make
- numpydoc
- pydata-sphinx-theme
- sphinx
2 changes: 0 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
Loading