-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (82 loc) · 2.14 KB
/
docs.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Docs
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
release:
types:
- published
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: false
swap-storage: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Set up CUDA toolkit
uses: Jimver/cuda-toolkit@master
with:
cuda: "12.1.0"
method: "network"
sub-packages: '["toolkit"]'
- name: Install torch with CUDA support
run: python -m pip install torch --index-url https://download.pytorch.org/whl/cu121
- name: Install torchhull
run: python -m pip install --editable ".[dev]"
- name: Build docs
run: nox -s docs
- uses: actions/upload-artifact@v4
with:
name: Docs HTML
path: build/docs/html
include-hidden-files: true
publish:
name: Upload release to GitHub Pages
runs-on: ubuntu-22.04
if: github.event_name == 'release' && github.event.action == 'published'
needs:
- build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: Docs HTML
path: build/docs/html
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/docs/html
clean: true
single-commit: true
check_docs:
if: always()
needs:
- build
- publish
name: "Check Docs"
runs-on: ubuntu-22.04
steps:
- uses: re-actors/alls-green@release/v1
with:
allowed-skips: publish
jobs: ${{ toJSON(needs) }}