From ac5451ce8b8f9df4a0b1a032bb61ebc28d584fc9 Mon Sep 17 00:00:00 2001 From: Luca Doglione Date: 2025年9月29日 10:39:18 +0200 Subject: [PATCH 1/3] Preview: trying to restore preview --- .github/workflows/preview.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 5e178438b6..63eb27e3a8 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -12,7 +12,24 @@ 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 concurrency: @@ -45,15 +62,22 @@ jobs: Waiting for deployment to complete... - uses: actions/checkout@v4 + with: + fetch-depth: "0" + - 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: | From 25874975aa0ba6c24dbddad2c4c6b4ffcbb7c8a9 Mon Sep 17 00:00:00 2001 From: Luca Doglione Date: 2025年9月29日 10:41:50 +0200 Subject: [PATCH 2/3] Adding deps for jobs --- .github/workflows/preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 63eb27e3a8..8e6381af69 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -32,6 +32,7 @@ jobs: 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 From 41259b710daa9d6ccf056986b98c52d458e1808a Mon Sep 17 00:00:00 2001 From: Luca Doglione Date: 2025年9月29日 10:49:47 +0200 Subject: [PATCH 3/3] Entire history is not needed for building preview --- .github/workflows/preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 8e6381af69..1eb8709a75 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -64,7 +64,7 @@ jobs: - uses: actions/checkout@v4 with: - fetch-depth: "0" + fetch-depth: 1 - name: Cleanup runner disk uses: ./.github/actions/cleanup-disk

AltStyle によって変換されたページ (->オリジナル) /