Skip to content

Commit 0e95007

Browse files
committed
edit the installation order
1 parent d90c6ee commit 0e95007

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

.github/workflows/build_and_deploy.yml

+22-20
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
# Note this workflow is also triggered by
55
# https://github.com/napari/napari/blob/main/.github/workflows/deploy_docs.yml when a
66
# 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+
714

815
name: Build & Deploy PR Docs
916

@@ -38,54 +45,50 @@ jobs:
3845
uses: actions/checkout@v4
3946
with:
4047
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
4449
fetch-depth: 1
4550

4651
- name: Clone napari repo
4752
uses: actions/checkout@v4
4853
with:
4954
persist-credentials: false
50-
# place in '/home/runner/work/docs/docs/napari'
55+
# p
5156
# docs and napari are in the same parent directory
52-
path: napari # place in a named directory
57+
path: napari
5358
repository: napari/napari
54-
# set to all for version
59+
# needs 0 depth to get the latest versions
5560
fetch-depth: 0
5661

5762
- name: Set up Python
5863
uses: astral-sh/setup-uv@v5
5964
with:
6065
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
6175
6276
- name: Install Qt Libraries
6377
uses: tlambert03/setup-qt-libs@v1
6478

65-
- name: Install Python
66-
uses: actions/setup-python@v5
67-
with:
68-
python-version: "3.10"
69-
7079
- name: Install Dependencies
7180
run: |
72-
uv venv
7381
uv pip install "napari/[pyqt5, docs]"
74-
cd ../napari
75-
make build
76-
cd ../docs
7782
env:
7883
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
7984

80-
- name: Testing
85+
- name: Test installation succeeded
8186
run: |
8287
python -c 'import napari; print(napari.__version__)'
8388
python -c 'import napari.layers; print(napari.layers.__doc__)'
8489
8590
- name: Create fallback videos
8691
run: |
87-
sudo apt-get update && sudo apt-get install -y ffmpeg
88-
cd docs
8992
make fallback-videos
9093
9194
- name: Build Docs
@@ -95,8 +98,6 @@ jobs:
9598
GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }}
9699
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
97100
with:
98-
# Runs in '/home/runner/work/docs/docs/docs'
99-
# Built HTML pages in '/home/runner/work/docs/docs/docs/docs/_build/html'
100101
run: make -C docs html
101102
# skipping setup stops the action from running the default (tiling) window manager
102103
# the window manager is not necessary for docs builds at this time and it was causing
@@ -116,6 +117,7 @@ jobs:
116117
runs-on: ubuntu-latest
117118
permissions:
118119
contents: write
120+
119121
# Working directory: '/home/runner/work/docs/docs'
120122
steps:
121123
- name: Download artifact

0 commit comments

Comments
 (0)