Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,45 @@ concurrency:
cancel-in-progress: true

jobs:
# The site has to actually build. Every check below this one reads content
# and compares it against something; none of them run Next, which is how a
# docs site that cannot be built sat on main behind a green tick. Two real
# breakages hid here: a floating base-image tag that took the Docker build
# with it, and a duplicated @base-ui/react that left a React context
# unresolvable at prerender. Both were invisible to every gate in this file.
build:
name: Site builds
runs-on: ubuntu-latest
defaults:
run:
working-directory: web-docs
steps:
- uses: actions/checkout@v7

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14

- uses: actions/setup-node@v7
with:
node-version: '26'

# --frozen-lockfile on purpose: the committed lockfile is what deploys,
# so a build that only passes after resolution drifts is not a pass.
- name: Install
run: bun install --frozen-lockfile

# Node, not bun, and Next invoked directly — the same command
# web-docs/Dockerfile runs, so this gate exercises the path that ships
# rather than a convenient local approximation. NEXT_PUBLIC_URL matches
# the Dockerfile's default for the same reason.
- name: Build
env:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: '1'
NEXT_PUBLIC_URL: https://fchub.co
run: node ./node_modules/next/dist/bin/next build

consistency:
name: Version Consistency
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/fchub-ci-contract.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ test('Docs CI watches the FCHub sources its own checks read', () => {
const consistency = job(docs, 'consistency')
assert.match(consistency, /node scripts\/check-fchub-docs\.mjs/)
assert.match(consistency, /node scripts\/sync-fchub-catalog\.mjs --check/)

// Every other check in Docs CI reads content and compares it to something.
// None of them runs Next, which is how a site that could not be built sat
// on main behind a green tick. Pinned so the gate cannot quietly go away:
// it must run the same command the Dockerfile does, on the committed
// lockfile, or it is testing something other than what deploys.
const build = job(docs, 'build')
assert.match(build, /bun install --frozen-lockfile/)
assert.match(build, /node \.\/node_modules\/next\/dist\/bin\/next build/)
})

/**
Expand Down