@@ -12,9 +12,27 @@ concurrency:
1212 cancel-in-progress : true
1313
1414jobs :
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
1620 if : ${{ contains(github.event.pull_request.labels.*.name, 'preview') || github.ref_name == 'main' }}
1721 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
1836 concurrency :
1937 group : netlify
2038 cancel-in-progress : false
@@ -45,15 +63,22 @@ jobs:
4563 Waiting for deployment to complete...
4664
4765 - uses : actions/checkout@v4
66+ with :
67+ fetch-depth : 1
4868
69+ - name : Cleanup runner disk
70+ uses : ./.github/actions/cleanup-disk
4971 - uses : actions/setup-node@v4
5072 with :
5173 node-version : 18
5274 cache : " npm"
5375 cache-dependency-path : " **/package-lock.json"
5476
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
5782
5883 - name : Copy Static Files
5984 run : |
0 commit comments