-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.74 KB
/
build-docs.yml
File metadata and controls
63 lines (53 loc) · 1.74 KB
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
62
63
name: "Render docs"
on: workflow_call
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
id: setup
- name: Cache Build
uses: actions/cache@v4
id: cache
with:
# if the list or anything in these folders expected to change, then cache needs to be cleared and rebuilt, because it is keyed only by pyproject.toml hash
path: .cache
key: build-doc-${{ hashFiles('pyproject.toml','Dockerfile.build-doc') }}
restore-keys: |
build-doc-
- name: Create folders on cache miss
run: |
mkdir -p .cache/var/cache/apt
mkdir -p .cache/var/lib/apt
mkdir -p .cache/root/.cache/pip
mkdir -p .cache/root/.distrib/rust
mkdir -p .cache/root/.cargo/registry
- name: Inject docker cache
uses: reproducible-containers/buildkit-cache-dance@v3.1.2
with:
cache-map: |
{
".cache/var/cache/apt": "/var/cache/apt",
".cache/var/lib/apt": "/var/lib/apt",
".cache/root/.cache/pip": "/root/.cache/pip",
".cache/root/.cargo/registry": "/root/.cargo/registry",
".cache/root/.distrib/rust": "/root/.distrib/rust"
}
- name: Build Doc
uses: docker/build-push-action@v6
with:
push: false
platforms: linux/arm64
# do not cache layers
file: Dockerfile.build-doc
outputs: type=local,dest=docs/_build/html
provenance: false
context: .
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html/