Skip to content

Commit f154c70

Browse files
authored
ci: build website on PRs that touch website/ (#5558)
documentation.yml only triggers on master, so develop-targeted PRs never built the website — a stale bun.lock or a breaking dependency bump could merge green unnoticed (as in #5553). Add a Website Build job to pr.yml gated on a website/ paths filter (job-level if:, same #5528 pattern) and wire it into the PR Quality Gate; frozen-lockfile install catches manifest/lockfile drift, the build catches everything else.
1 parent 36cc5cb commit f154c70

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

.github/workflows/pr.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
outputs:
3535
non_stb: ${{ steps.filter.outputs.non_stb }}
3636
docs: ${{ steps.filter.outputs.docs }}
37+
website: ${{ steps.filter.outputs.website }}
3738
steps:
3839
- uses: actions/checkout@v4
3940
- uses: dorny/paths-filter@v3
@@ -45,6 +46,8 @@ jobs:
4546
- '!tools/stb/**'
4647
docs:
4748
- 'docs/**'
49+
website:
50+
- 'website/**'
4851
4952
# Enforce the GFM-intersection markdown subset on docs/ so every page
5053
# renders identically on GitHub and in the website generator. Not a
@@ -62,6 +65,28 @@ jobs:
6265
node-version: ${{ env.NODE_VERSION }}
6366
- run: node scripts/lint-docs.mjs
6467

68+
# The website previously had no PR coverage on develop: documentation.yml
69+
# only triggers on master, so a website change (e.g. a dependency bump
70+
# with a stale bun.lock) could merge green without ever being built.
71+
# Frozen-lockfile install + full build catches both.
72+
website-build:
73+
name: Website Build
74+
runs-on: ubuntu-latest
75+
needs: changes
76+
if: needs.changes.outputs.website == 'true'
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: actions/setup-node@v4
80+
with:
81+
node-version: ${{ env.NODE_VERSION }}
82+
- uses: oven-sh/setup-bun@v1
83+
with:
84+
bun-version: ${{ env.BUN_VERSION }}
85+
- name: Install dependencies
86+
run: cd website && bun install --frozen-lockfile
87+
- name: Build website
88+
run: cd website && bun run build
89+
6590
lint:
6691
name: Lint Check
6792
runs-on: ubuntu-latest
@@ -271,7 +296,7 @@ jobs:
271296
pr-success:
272297
name: PR Quality Gate
273298
runs-on: ubuntu-latest
274-
needs: [lint, test-frontend, test-backend, build-check]
299+
needs: [lint, test-frontend, test-backend, build-check, website-build]
275300
if: always()
276301
steps:
277302
- name: Check all jobs
@@ -282,7 +307,8 @@ jobs:
282307
for res in "${{ needs.lint.result }}" \
283308
"${{ needs.test-frontend.result }}" \
284309
"${{ needs.test-backend.result }}" \
285-
"${{ needs.build-check.result }}"; do
310+
"${{ needs.build-check.result }}" \
311+
"${{ needs.website-build.result }}"; do
286312
if [ "$res" != "success" ] && [ "$res" != "skipped" ]; then
287313
echo "❌ One or more required checks failed (result: $res)"
288314
exit 1

0 commit comments

Comments
 (0)