Skip to content

Commit 137dc91

Browse files
authored
Merge pull request #2643 from arduino/fix-preview-generation
Preview: fix no space left on device
2 parents cb6771a + 41259b7 commit 137dc91

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.github/workflows/preview.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,27 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
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
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

Comments
 (0)