Skip to content

Skip tests and checks when PR only contains docs changes #482

Skip tests and checks when PR only contains docs changes

Skip tests and checks when PR only contains docs changes #482

Workflow file for this run

# Copyright (c) 2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build docs
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
workflow_call:
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/0.8.22/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Create virtual environment
run: uv venv
- name: Install docs dependencies (skip project deps to avoid CUDA)
run: |
uv pip install \
"myst-parser>=4.0.1" \
"nvidia-sphinx-theme>=0.0.8" \
"sphinx>=8.1.3" \
"sphinx-autobuild>=2024.10.3" \
"sphinx-autodoc2>=0.5.0" \
"sphinx-copybutton>=0.5.2"
- name: Build documentation
run: |
source .venv/bin/activate
sphinx-build -b html docs docs/build/html
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/build/html/