Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,27 @@ concurrency:
cancel-in-progress: true

jobs:
run:

# This job is used to render datasheets, but only if they have changed.
# It's a separate job so we don't have to cleanup the machine afterwards.
render-datasheets:
name: Render Datasheets
if: ${{ contains(github.event.pull_request.labels.*.name, 'preview') || github.ref_name == 'main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: ./.github/actions/generate-datasheets
with:
artifact-name: datasheets
datasheets-path: static/resources/datasheets

preview-build:
if: ${{ contains(github.event.pull_request.labels.*.name, 'preview') || github.ref_name == 'main' }}
runs-on: ubuntu-latest
needs: render-datasheets
concurrency:
group: netlify
cancel-in-progress: false
Expand Down Expand Up @@ -45,15 +63,22 @@ jobs:
Waiting for deployment to complete...

- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Cleanup runner disk
uses: ./.github/actions/cleanup-disk
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: "**/package-lock.json"

- name: Render Datasheets
run: cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
- name: Retrieve Datasheets
uses: actions/download-artifact@v4
with:
name: datasheets
path: static/resources/datasheets

- name: Copy Static Files
run: |
Expand Down
Loading