From 1c5ff5a707fb2ac3793980a11834bafd606b907e Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Tue, 28 Jul 2026 09:12:08 -0400 Subject: [PATCH] ci: validate site builds on pull requests Adds a PR-time site build check so changes to site/**, site/package-lock.json, or the site workflow files are validated before merge, mirroring the existing web CI pattern. The workflow uses a paths-filter with a skip shim inside a single job named 'Build' so branch protection can require it without deadlocking non-site PRs. When no site files changed the job short-circuits after the filter step and still reports success. Closes #473 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/site-ci.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/site-ci.yml diff --git a/.github/workflows/site-ci.yml b/.github/workflows/site-ci.yml new file mode 100644 index 00000000..4420cd6a --- /dev/null +++ b/.github/workflows/site-ci.yml @@ -0,0 +1,51 @@ +name: Site Build + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + +# Ensure the check name (`Build`) always reports, even for PRs that don't +# touch the docs site. This lets branch protection require this check +# without deadlocking non-site PRs. When no site files changed the job +# short-circuits after the paths-filter step and reports success. +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Detect site changes + id: filter + uses: dorny/paths-filter@v3 + with: + filters: | + site: + - 'site/**' + - '.github/workflows/site-ci.yml' + - '.github/workflows/pages.yml' + + - name: Skip (no site changes) + if: steps.filter.outputs.site != 'true' && github.event_name == 'pull_request' + run: echo "No site/** changes detected — skipping site build." + + - name: Setup Node + if: steps.filter.outputs.site == 'true' || github.event_name != 'pull_request' + uses: actions/setup-node@v7 + with: + node-version: '22.12.0' + cache: npm + cache-dependency-path: site/package-lock.json + + - name: Install dependencies + if: steps.filter.outputs.site == 'true' || github.event_name != 'pull_request' + working-directory: site + run: npm ci + + - name: Build site + if: steps.filter.outputs.site == 'true' || github.event_name != 'pull_request' + working-directory: site + run: npm run build