Skip to content

Commit 8994b00

Browse files
authored
Merge branch 'master' into ci/drop-wheels
2 parents c642f41 + e9368a7 commit 8994b00

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/docs-build.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,47 +70,57 @@ jobs:
7070
# only Pytorch has/uses notebooks
7171
submodules: ${{ matrix.pkg-name == 'pytorch' }}
7272
lfs: ${{ matrix.pkg-name == 'pytorch' }}
73-
- uses: actions/setup-python@v6
73+
74+
- name: Install uv and set Python version
75+
uses: astral-sh/setup-uv@v6
7476
with:
7577
python-version: "3.10"
78+
# TODO: Avoid activating environment like this
79+
# see: https://github.com/astral-sh/setup-uv/tree/v6/?tab=readme-ov-file#activate-environment
80+
activate-environment: true
81+
enable-cache: true
7682

7783
- name: List notebooks
7884
if: ${{ matrix.pkg-name == 'pytorch' }}
7985
working-directory: _notebooks/
8086
run: |
81-
pip install -q py-tree
87+
uv pip install -q py-tree
8288
py-tree .notebooks/
8389
ls -lhR .notebooks/
8490
8591
- name: Pull sphinx template
8692
run: |
87-
pip install -q -r requirements/ci.txt
93+
uv pip install -q -r requirements/ci.txt
8894
aws s3 sync --no-sign-request s3://sphinx-packages/ ${PYPI_LOCAL_DIR}
89-
pip install lai-sphinx-theme -U -f ${PYPI_LOCAL_DIR}
95+
uv pip install lai-sphinx-theme -U -f ${PYPI_LOCAL_DIR}
9096
9197
- name: Install pandoc & texlive
9298
if: ${{ matrix.pkg-name == 'pytorch' }}
9399
timeout-minutes: 5
94100
run: |
95101
sudo apt-get update --fix-missing
96102
sudo apt-get install -y pandoc
103+
97104
- name: Install package & dependencies
98105
timeout-minutes: 20
99106
run: |
100-
pip install .[all] -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
107+
uv pip install .[all] -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
101108
-f ${PYPI_LOCAL_DIR} --extra-index-url="${TORCH_URL}"
102-
pip list
109+
uv pip list
110+
103111
- name: Install req. for Notebooks/tutorials
104112
if: matrix.pkg-name == 'pytorch'
105113
timeout-minutes: 10
106-
run: pip install -q -r _notebooks/.actions/requires.txt
114+
run: uv pip install -q -r _notebooks/.actions/requires.txt
107115

108116
- name: Full build for deployment
109117
if: github.event_name != 'pull_request'
110118
run: echo "DOCS_FETCH_ASSETS=1" >> $GITHUB_ENV
119+
111120
- name: Build without warnings
112121
if: github.event_name != 'workflow_dispatch'
113122
run: echo "BUILD_SPHINX_OPTS=-W --keep-going" >> $GITHUB_ENV
123+
114124
- name: Make ${{ matrix.target }}
115125
working-directory: ./docs/source-${{ matrix.pkg-name }}
116126
# allow failing link check and doctest if you run with dispatch
@@ -120,6 +130,7 @@ jobs:
120130
- name: Keep artifact
121131
if: github.event_name == 'pull_request'
122132
run: echo "ARTIFACT_DAYS=7" >> $GITHUB_ENV
133+
123134
- name: Upload built docs
124135
if: ${{ matrix.target == 'html' }}
125136
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)