From 68da511c0e4b61f91c735342301c31675b9d6606 Mon Sep 17 00:00:00 2001 From: Nate Laverdure Date: Thu, 8 Oct 2026 14:03:27 -0400 Subject: [PATCH 1/2] Update CI/CD actions and add non-blocking format check - Bump actions/checkout and actions/setup-node to v7, and github-pages-deploy-action to v4.9.0. - Run CI on pull_request too, so PRs from forks get checked. - Add a Prettier check before the build. It warns on failure and does not fail the job; the prebuild step rewrites formatting, so CI never surfaced it before. - Add a concurrency group to CD so overlapping deploys queue instead of racing. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/cd.yml | 10 +++++++--- .github/workflows/ci.yml | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9ca52731..933cde56 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,6 +8,10 @@ on: permissions: contents: write +concurrency: + group: deploy + cancel-in-progress: false + jobs: deploy: runs-on: ubuntu-latest @@ -15,10 +19,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Set up Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v7 with: node-version: 24 @@ -29,7 +33,7 @@ jobs: run: npm run build - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4.8.0 + uses: JamesIves/github-pages-deploy-action@v4.9.0 with: branch: gh-pages folder: ./dist diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e0635e3..48064f0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,8 @@ name: CI -on: [push] +on: + push: + pull_request: jobs: build-and-test: @@ -8,15 +10,26 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Set up Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v7 with: node-version: 24 - name: Install dependencies run: npm install + # Runs before Build, because the prebuild script rewrites formatting. + # A failure shows a warning but does not fail the job. + - name: Check formatting + id: format + continue-on-error: true + run: npm run format:check + + - name: Warn on formatting issues + if: steps.format.outcome == 'failure' + run: echo "::warning title=Formatting::Prettier found unformatted files. Run 'npm run format' and commit the result." + - name: Build run: npm run build From 161fcc7dde40ec98fcbadebbf9964087646cfcd0 Mon Sep 17 00:00:00 2001 From: Nate Laverdure Date: Thu, 8 Oct 2026 14:07:03 -0400 Subject: [PATCH 2/2] Run CI on push only for main, to avoid duplicate PR runs Branch PRs ran CI twice, once per event. The pull_request run covers every PR, including forks, and tests the merge with main. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48064f0a..b6a7cdba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ name: CI on: push: + branches: [main] pull_request: jobs: