From 1168e78e13bcde71fc9b895d80ccd46b4eb639ca Mon Sep 17 00:00:00 2001 From: jamesconwaydev <148910373+jamesconwaydev@users.noreply.github.com> Date: Fri, 6 Nov 2026 12:57:52 -0700 Subject: [PATCH] ci: run the site tests and build on every PR, not only after merge --- .github/workflows/pr-checks.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index e1fb1bd..8c056d3 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -58,3 +58,36 @@ jobs: node-version: "24" - run: npm ci --ignore-scripts - run: git ls-files -z | xargs -0 npx prettier --check --ignore-unknown + + # Deploy runs these too, but only after merge; a broken site change would land on main first. + site: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + env: + # The build otherwise reports usage to telemetry.astro.build. + ASTRO_TELEMETRY_DISABLED: 1 + steps: + - uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3 + with: + egress-policy: audit + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: stats + path: stats-data + persist-credentials: false + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "22" + cache: npm + cache-dependency-path: site/package-lock.json + - run: npm ci --ignore-scripts + working-directory: site + - run: npm test + working-directory: site + - run: npm run build + working-directory: site