@@ -12,9 +12,27 @@ concurrency:
12
12
cancel-in-progress : true
13
13
14
14
jobs :
15
- run :
15
+
16
+ # This job is used to render datasheets, but only if they have changed.
17
+ # It's a separate job so we don't have to cleanup the machine afterwards.
18
+ render-datasheets :
19
+ name : Render Datasheets
16
20
if : ${{ contains(github.event.pull_request.labels.*.name, 'preview') || github.ref_name == 'main' }}
17
21
runs-on : ubuntu-latest
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+ with :
25
+ fetch-depth : 1
26
+
27
+ - uses : ./.github/actions/generate-datasheets
28
+ with :
29
+ artifact-name : datasheets
30
+ datasheets-path : static/resources/datasheets
31
+
32
+ preview-build :
33
+ if : ${{ contains(github.event.pull_request.labels.*.name, 'preview') || github.ref_name == 'main' }}
34
+ runs-on : ubuntu-latest
35
+ needs : render-datasheets
18
36
concurrency :
19
37
group : netlify
20
38
cancel-in-progress : false
@@ -45,15 +63,22 @@ jobs:
45
63
Waiting for deployment to complete...
46
64
47
65
- uses : actions/checkout@v4
66
+ with :
67
+ fetch-depth : 1
48
68
69
+ - name : Cleanup runner disk
70
+ uses : ./.github/actions/cleanup-disk
49
71
- uses : actions/setup-node@v4
50
72
with :
51
73
node-version : 18
52
74
cache : " npm"
53
75
cache-dependency-path : " **/package-lock.json"
54
76
55
- - name : Render Datasheets
56
- run : cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
77
+ - name : Retrieve Datasheets
78
+ uses : actions/download-artifact@v4
79
+ with :
80
+ name : datasheets
81
+ path : static/resources/datasheets
57
82
58
83
- name : Copy Static Files
59
84
run : |
0 commit comments