diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 335faa4f66..6b1df8d284 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -36,14 +36,14 @@ jobs: # https://github.com/actions/checkout/issues/520#issuecomment-1320838255 fetch-depth: 2147483647 - - name: Use Node.js LTS - uses: actions/setup-node@v3 + - name: Use Node.js 20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'npm' - name: Cache Webpack Build - uses: actions/cache@v3 + uses: actions/cache@v4 env: TAR_OPTIONS: "--remove-files" with: @@ -59,7 +59,7 @@ jobs: - name: Deploy to Netlify id: deploy if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }} - uses: nwtgck/actions-netlify@v2 + uses: nwtgck/actions-netlify@v3 with: publish-dir: build production-branch: master @@ -74,13 +74,11 @@ jobs: - name: Compress Build Archive if: ${{ steps.deploy.conclusion == 'skipped' }} - run: | - echo "PR_NUMBER=${{ github.event.pull_request.number }}" > build/.env - tar --remove-files --zstd -cf build.tar.zst build + run: tar --label=${{ github.event.pull_request.number }} --remove-files --zstd -cf build.tar.zst build - name: Upload Build Artifact if: ${{ steps.deploy.conclusion == 'skipped' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: preview-build path: build.tar.zst diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 4119744de3..50dca1ec48 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Download Build Artifact id: download-artifact - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v6 with: workflow: build-docs.yml run_id: ${{ github.event.workflow_run.id }} @@ -29,13 +29,14 @@ jobs: - name: Extract Build Archive if: ${{ steps.download-artifact.outputs.found_artifact == 'true' }} run: | - tar -xf build.tar.zst && rm build.tar.zst - cat build/.env >> "$GITHUB_ENV" && rm build/.env + tar -xf build.tar.zst + printf "PR_NUMBER=%d\n" "$(tar --test-label -f build.tar.zst)" >> "$GITHUB_ENV" + rm build.tar.zst - name: Deploy to Netlify id: deploy if: ${{ steps.download-artifact.outputs.found_artifact == 'true' }} - uses: nwtgck/actions-netlify@v2 + uses: nwtgck/actions-netlify@v3 with: publish-dir: build production-deploy: false