File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ applyTo: '/**'
1414* Never edit ` readme.md ` directly — it is generated from ` docs/index.md ` via ` make docs `
1515* To install all dependencies (including all optional extras) run ` make install-dev `
1616* Do not modify code unless the developer explicitly asks for a code change.
17+ * Never run ` git commit ` (or ` git push ` ) unless the developer explicitly asks for it.
18+ Preparing changes in the working tree is the deliverable; committing is the developer's action.
1719* Never change code that works unless you have been asked by the developer to do so,
1820 or you have a good reason to believe the code is wrong.
1921* Concentrate on fixing the problem, not on making the code look nice unless you are
Original file line number Diff line number Diff line change 5454 token : ${{ secrets.CODECOV_TOKEN }}
5555 files : ./build/coverage.xml
5656
57+ examples :
58+ if : github.ref != 'refs/heads/main'
59+ uses : ./.github/workflows/examples.yml
60+ with :
61+ upload : false
62+
5763 image :
5864 if : github.ref == 'refs/heads/main'
5965 uses : ./.github/workflows/docker-multiarch.yml
Original file line number Diff line number Diff line change 88 type : string
99
1010jobs :
11+ build-examples :
12+ uses : ./.github/workflows/examples.yml
13+ with :
14+ upload : true
15+
1116 build-amd64 :
17+ needs : build-examples
1218 runs-on : ubuntu-latest
1319 env :
1420 GITHUB_TOKEN : ${{ github.token }}
1521
1622 steps :
1723 - uses : actions/checkout@v4
24+ - name : download examples output
25+ uses : actions/download-artifact@v4
26+ with :
27+ name : examples-output
28+ path : docs
1829 - name : Login to GitHub Container Registry
1930 uses : docker/login-action@v3
2031 with :
@@ -31,13 +42,19 @@ jobs:
3142 run : rops docker push ${{ inputs.image-name }} --arch
3243
3344 build-arm64 :
45+ needs : build-examples
3446 runs-on : ubuntu-24.04-arm
3547 env :
3648 GITHUB_TOKEN : ${{ github.token }}
3749 DOCKER_BUILDKIT : 0
3850
3951 steps :
4052 - uses : actions/checkout@v4
53+ - name : download examples output
54+ uses : actions/download-artifact@v4
55+ with :
56+ name : examples-output
57+ path : docs
4158 - name : Login to GitHub Container Registry
4259 uses : docker/login-action@v3
4360 with :
Original file line number Diff line number Diff line change 1+ name : examples
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ upload :
7+ description : Upload the generated outputs as an artifact
8+ type : boolean
9+ default : true
10+
11+ jobs :
12+ build-examples :
13+ runs-on : ubuntu-latest
14+ env :
15+ GITHUB_TOKEN : ${{ github.token }}
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+ - name : Set up Python
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version : " 3.14"
23+ - name : Install uv
24+ run : pip install -U pip uv
25+ - name : Install dependencies
26+ run : uv sync --frozen --no-install-project --group docs --extra data
27+ - name : build examples
28+ run : uv run ./dev/build-examples
29+ - name : upload examples output
30+ if : inputs.upload
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : examples-output
34+ path : |
35+ docs/assets/examples/
36+ docs/examples/output/
37+ if-no-files-found : error
Original file line number Diff line number Diff line change @@ -4,10 +4,8 @@ FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim AS builder
44
55WORKDIR /build
66
7- # Install Chromium for kaleido (Plotly static image export used by docs examples)
87# Install Node.js for Observable Framework frontend build
98RUN apt-get update && apt-get install -y --no-install-recommends \
10- chromium \
119 nodejs \
1210 npm \
1311 && rm -rf /var/lib/apt/lists/*
@@ -18,7 +16,9 @@ COPY pyproject.toml uv.lock readme.md ./
1816# Install dependencies (no root package, with needed extras)
1917RUN uv sync --frozen --no-install-project --group docs --extra data
2018
21- # Copy source, generate example outputs and images, then build docs
19+ # Copy source and build docs
20+ # Example outputs and images must be prebuilt in the build context
21+ # (run `uv run ./dev/build-examples` locally, or the build-examples CI job)
2222COPY mkdocs.yml ./
2323COPY dev/ ./dev/
2424COPY docs/ ./docs/
@@ -27,7 +27,6 @@ COPY frontend/ ./frontend/
2727COPY app/ ./app/
2828RUN npm --prefix frontend install
2929RUN npm --prefix frontend run build
30- RUN uv run ./dev/build-examples
3130RUN uv run mkdocs build
3231
3332# Stage 2: Runtime stage
You can’t perform that action at this time.
0 commit comments