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