-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (51 loc) · 1.51 KB
/
docs-python.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
name: Build Python documentation
on:
pull_request:
paths:
- docs/**
- .github/workflows/docs-python.yml
push:
branches:
- main
paths:
- docs/**
- .github/workflows/docs-python.yml
repository_dispatch:
types: [test-python]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build-python-docs:
strategy:
fail-fast: true
matrix:
python-version: ['3.12']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create virtual environment
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv -p ${{ matrix.python-version }}
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV
- name: Install Python dependencies
working-directory: docs
run: uv pip install -r requirements-docs.txt
# Cache HDF5
- uses: awalsh128/cache-apt-pkgs-action@latest
name: Cache apt packages
with:
packages: libhdf5-dev
version: 1.0
- name: Install up4
run: uv pip install .
- name: Build Python documentation
working-directory: docs
run: make html
- name: Deploy Python docs for latest development version
if: github.event_name == 'push' && github.ref_name == 'uPPPP'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/build/html