From 3a7ac2cfe8dbb248f24003f5101a31037785297a Mon Sep 17 00:00:00 2001 From: James Telfer <792299+jamestelfer@users.noreply.github.com> Date: Fri, 27 Mar 2026 22:05:09 +1100 Subject: [PATCH 1/4] ci: restructure build pipeline for dual deployment Replace withastro/action with explicit steps so the workflow produces both a GitHub Pages artifact and a generic dist/ artifact. Adds pull_request trigger for future preview support. GitHub Pages deploy is conditioned on push to main so PRs don't trigger deployment. Closes chinmina-docs-7yn.1 --- .github/workflows/deploy.yaml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 85f3f7f..768a1b3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,11 +1,9 @@ name: Deploy to GitHub Pages on: - # Trigger the workflow every time you push to the `main` branch - # Using a different branch name? Replace `main` with your branch’s name push: branches: [main] - # Allows you to run this workflow manually from the Actions tab on GitHub. + pull_request: workflow_dispatch: # Allow this job to clone the repo and create a page deployment @@ -23,15 +21,27 @@ jobs: - name: Install D2 diagramming tool run: | curl -fsSL https://d2lang.com/install.sh | sh -s -- - - name: Install, build, and upload your site - uses: withastro/action@v4 - # with: - # path: . # The root location of your Astro project inside the repository. (optional) - # node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional) - # package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + enable-corepack: true + - name: Install dependencies + run: pnpm install + - name: Build site + run: pnpm run build + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: dist/ + - name: Upload dist artifact + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ deploy: needs: build + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest environment: name: github-pages From ec8957536cc3dcdefe163465d6f161237f8a41d1 Mon Sep 17 00:00:00 2001 From: James Telfer <792299+jamestelfer@users.noreply.github.com> Date: Fri, 27 Mar 2026 22:21:47 +1100 Subject: [PATCH 2/4] ci: fix corepack enable and update action versions Replace non-existent enable-corepack input on setup-node with an explicit corepack enable run step. Update actions to latest versions: setup-node v6, upload-pages-artifact v4, upload-artifact v7, deploy-pages v5. --- .github/workflows/deploy.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 768a1b3..1bfbc36 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -22,19 +22,19 @@ jobs: run: | curl -fsSL https://d2lang.com/install.sh | sh -s -- - name: Set up Node.js - uses: actions/setup-node@v4 - with: - enable-corepack: true + uses: actions/setup-node@v6 + - name: Enable corepack + run: corepack enable - name: Install dependencies run: pnpm install - name: Build site run: pnpm run build - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v4 with: path: dist/ - name: Upload dist artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: dist path: dist/ @@ -49,4 +49,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 From 1f3342034e69dd4d2b6bf492c92222f2445b354f Mon Sep 17 00:00:00 2001 From: James Telfer <792299+jamestelfer@users.noreply.github.com> Date: Fri, 27 Mar 2026 22:26:15 +1100 Subject: [PATCH 3/4] ci: update checkout to v6 --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 1bfbc36..f6fc821 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout your repository using git - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install D2 diagramming tool run: | curl -fsSL https://d2lang.com/install.sh | sh -s -- From a1bbbc5d0e5c9b7d00176a17a1b825c5e1c14f5e Mon Sep 17 00:00:00 2001 From: James Telfer <792299+jamestelfer@users.noreply.github.com> Date: Fri, 27 Mar 2026 22:34:52 +1100 Subject: [PATCH 4/4] ci: replace .mise.toml with .tool-versions for node version Switch from mise.toml to the asdf-compatible .tool-versions file so both mise and actions/setup-node (via node-version-file) read the node version from a single authoritative source. --- .github/workflows/deploy.yaml | 2 ++ .mise.toml | 2 -- .tool-versions | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 .mise.toml create mode 100644 .tool-versions diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f6fc821..735ce85 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -23,6 +23,8 @@ jobs: curl -fsSL https://d2lang.com/install.sh | sh -s -- - name: Set up Node.js uses: actions/setup-node@v6 + with: + node-version-file: .tool-versions - name: Enable corepack run: corepack enable - name: Install dependencies diff --git a/.mise.toml b/.mise.toml deleted file mode 100644 index 6ea5a7e..0000000 --- a/.mise.toml +++ /dev/null @@ -1,2 +0,0 @@ -[tools] -node = "24" diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..695dfec --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 24