4
4
# Note this workflow is also triggered by
5
5
# https://github.com/napari/napari/blob/main/.github/workflows/deploy_docs.yml when a
6
6
# commit to `main` occurs in `napari/napari`
7
+ #
8
+ # For builds:
9
+ # working directory: '/home/runner/work/docs/docs'
10
+ # docs and napari are in the same parent directory
11
+ # place docs in: '/home/runner/work/docs/docs/docs'
12
+ # place napari in: '/home/runner/work/docs/docs/napari'
13
+
7
14
8
15
name : Build & Deploy PR Docs
9
16
@@ -38,54 +45,50 @@ jobs:
38
45
uses : actions/checkout@v4
39
46
with :
40
47
persist-credentials : false
41
- # place in '/home/runner/work/docs/docs/docs'
42
- # docs and napari are in the same parent directory
43
- path : docs # place in a named directory
48
+ path : docs
44
49
fetch-depth : 1
45
50
46
51
- name : Clone napari repo
47
52
uses : actions/checkout@v4
48
53
with :
49
54
persist-credentials : false
50
- # place in '/home/runner/work/docs/docs/napari'
55
+ # p
51
56
# docs and napari are in the same parent directory
52
- path : napari # place in a named directory
57
+ path : napari
53
58
repository : napari/napari
54
- # set to all for version
59
+ # needs 0 depth to get the latest versions
55
60
fetch-depth : 0
56
61
57
62
- name : Set up Python
58
63
uses : astral-sh/setup-uv@v5
59
64
with :
60
65
enable-cache : true
66
+ python-version : " 3.10"
67
+
68
+ - name : Set up video dependency
69
+ run : sudo apt-get update && sudo apt-get install -y ffmpeg
70
+
71
+ - name : Create a virtual environment to use for the builds
72
+ run : |
73
+ uv venv
74
+ source .venv/bin/activate
61
75
62
76
- name : Install Qt Libraries
63
77
uses : tlambert03/setup-qt-libs@v1
64
78
65
- - name : Install Python
66
- uses : actions/setup-python@v5
67
- with :
68
- python-version : " 3.10"
69
-
70
79
- name : Install Dependencies
71
80
run : |
72
- uv venv
73
81
uv pip install "napari/[pyqt5, docs]"
74
- cd ../napari
75
- make build
76
- cd ../docs
77
82
env :
78
83
PIP_CONSTRAINT : ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
79
84
80
- - name : Testing
85
+ - name : Test installation succeeded
81
86
run : |
82
87
python -c 'import napari; print(napari.__version__)'
83
88
python -c 'import napari.layers; print(napari.layers.__doc__)'
84
89
85
90
- name : Create fallback videos
86
91
run : |
87
- sudo apt-get update && sudo apt-get install -y ffmpeg
88
- cd docs
89
92
make fallback-videos
90
93
91
94
- name : Build Docs
95
98
GOOGLE_CALENDAR_API_KEY : ${{ secrets.GOOGLE_CALENDAR_API_KEY }}
96
99
PIP_CONSTRAINT : ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
97
100
with :
98
- # Runs in '/home/runner/work/docs/docs/docs'
99
- # Built HTML pages in '/home/runner/work/docs/docs/docs/docs/_build/html'
100
101
run : make -C docs html
101
102
# skipping setup stops the action from running the default (tiling) window manager
102
103
# the window manager is not necessary for docs builds at this time and it was causing
@@ -116,6 +117,7 @@ jobs:
116
117
runs-on : ubuntu-latest
117
118
permissions :
118
119
contents : write
120
+
119
121
# Working directory: '/home/runner/work/docs/docs'
120
122
steps :
121
123
- name : Download artifact
0 commit comments