@@ -12,7 +12,24 @@ 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
20+ if : ${{ contains(github.event.pull_request.labels.*.name, 'preview') || github.ref_name == 'main' }}
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 :
1633 if : ${{ contains(github.event.pull_request.labels.*.name, 'preview') || github.ref_name == 'main' }}
1734 runs-on : ubuntu-latest
1835 concurrency :
@@ -45,15 +62,22 @@ jobs:
4562 Waiting for deployment to complete...
4663
4764 - uses : actions/checkout@v4
65+ with :
66+ fetch-depth : " 0"
4867
68+ - name : Cleanup runner disk
69+ uses : ./.github/actions/cleanup-disk
4970 - uses : actions/setup-node@v4
5071 with :
5172 node-version : 18
5273 cache : " npm"
5374 cache-dependency-path : " **/package-lock.json"
5475
55- - name : Render Datasheets
56- run : cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
76+ - name : Retrieve Datasheets
77+ uses : actions/download-artifact@v4
78+ with :
79+ name : datasheets
80+ path : static/resources/datasheets
5781
5882 - name : Copy Static Files
5983 run : |
0 commit comments