forked from scikit-learn/scikit-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.27 KB
/
build-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
# Workflow to build the documentation
name: Documentation builder
on:
push:
branches:
- main
# Release branches
- "[0-9]+.[0-9]+.X"
pull_request:
branches:
- main
- "[0-9]+.[0-9]+.X"
jobs:
# Build the documentation against the minimum version of the dependencies
doc-min-dependencies:
# This prevents this workflow from running on a fork.
# To test this workflow on a fork, uncomment the following line.
if: github.repository == 'scikit-learn/scikit-learn'
runs-on: ubuntu-latest
steps:
- name: Checkout scikit-learn
uses: actions/checkout@v2
with:
# needed by build_doc.sh to compute the list of changed doc files:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python
uses: actions/setup-python@v2
- name: Build documentation
run: bash build_tools/github/build_doc.sh
env:
OMP_NUM_THREADS: 2
MKL_NUM_THREADS: 2
CONDA_ENV_NAME: testenv
LOCK_FILE: build_tools/github/doc_min_dependencies_linux-64_conda.lock
- name: Upload documentation
uses: actions/upload-artifact@v2
with:
name: doc-min-dependencies
path: doc/_build/html/stable
# Build the documentation against the latest version of the dependencies
doc:
# This prevents this workflow from running on a fork.
# To test this workflow on a fork, uncomment the following line.
if: github.repository == 'scikit-learn/scikit-learn'
runs-on: ubuntu-latest
steps:
- name: Checkout scikit-learn
uses: actions/checkout@v2
with:
# needed by build_doc.sh to compute the list of changed doc files:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python
uses: actions/setup-python@v2
- name: Build documentation
run: bash build_tools/github/build_doc.sh
env:
OMP_NUM_THREADS: 2
MKL_NUM_THREADS: 2
CONDA_ENV_NAME: testenv
LOCK_FILE: build_tools/github/doc_linux-64_conda.lock
- name: Upload documentation
uses: actions/upload-artifact@v2
with:
name: doc
path: doc/_build/html/stable