From f130b50475486a3e32cb73bb4ab171f67cc306c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20F=C3=BCcher?= Date: Tue, 31 Mar 2026 11:29:42 -0300 Subject: [PATCH] CI: fix docs-deploy Node version for Astro build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deploy workflow ran the library build (webpack, Node 20) and the Astro website build in the same job under node-version 20, causing Astro to fail with "Node.js v20 is not supported". A single job can only run one Node version, so split the build job: - build-library (Node 20): builds the webpack bundle and uploads it as a GitHub Actions artifact - build-website (Node 22): downloads the bundle, copies it into website/public/, installs website deps, builds the Astro site, and uploads the Pages artifact - deploy: now depends on build-website (unchanged otherwise) 🤖 Generated with [eca](https://eca.dev) Co-Authored-By: eca --- .github/workflows/docs-deploy.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index bcec0f0..45ee468 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -19,7 +19,7 @@ concurrency: cancel-in-progress: false jobs: - build: + build-library: runs-on: ubuntu-22.04 steps: - name: Checkout @@ -36,6 +36,30 @@ jobs: - name: Build library run: npm run build + - name: Upload library bundle + uses: actions/upload-artifact@v4 + with: + name: astrochart-bundle + path: dist/astrochart.js + + build-website: + needs: build-library + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Download library bundle + uses: actions/download-artifact@v4 + with: + name: astrochart-bundle + path: dist + - name: Copy bundle to website run: cp dist/astrochart.js website/public/astrochart.js @@ -53,7 +77,7 @@ jobs: path: website/dist deploy: - needs: build + needs: build-website runs-on: ubuntu-22.04 environment: name: github-pages