Repository navigation
58 lines (47 loc) · 1.66 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
58 lines (47 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy Documentation
on:
push:
branches: [ main ]
paths:
- "docs/**"
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
jobs:
run:
name: Deploy documentation from the supported CUDA environment
runs-on: [self-hosted, linux, x64, cuda, multi-gpu]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: astral-sh/setup-uv@v6
- name: Install the locked documentation environment
run: uv sync --locked --extra docs
- name: Require the supported CUDA environment
run: |
uv run python - <<'PY'
import platform
import sys
import torch
assert sys.platform == "linux", sys.platform
assert platform.machine() == "x86_64", platform.machine()
assert torch.version.cuda == "12.8", torch.version.cuda
assert torch.cuda.is_available(), "CUDA is not available"
assert torch.cuda.device_count() >= 2, torch.cuda.device_count()
assert torch.distributed.is_nccl_available(), "NCCL is not available"
PY
- name: Build HTML without warnings
run: uv run sphinx-build -W --keep-going -b html docs/source docs/_build/html
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/_build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html