Repository navigation
fix(docs): the shipped admin sets no longer carry the export wildcard #371
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| merge_group: | |
| jobs: | |
| # The four Node floor declarations (`engines.node` in the root, in `apps/docs` | |
| # and in `tools/ci-scripts`, plus `.node-version`) are read by nothing in the | |
| # install path: `.npmrc` sets no `engine-strict`, pnpm does not enforce | |
| # `engines` by default, and every workflow here pins `node-version` | |
| # explicitly instead of consulting them. This job is what makes them | |
| # mechanically checkable. It needs no install — the script is zero-dependency | |
| # and reads the lockfile as text — so it stays a seconds-long job that can | |
| # run alongside `build`. | |
| node-floor: | |
| name: Node floor | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| # 裁决 (PR #74): a validator observed only green is indistinguishable | |
| # from one that cannot go red. The fixtures run before the real scan, so | |
| # a rule that stopped being able to fail fails the job on its own. | |
| - name: Self-test | |
| shell: bash | |
| run: node .github/scripts/check-node-floor.mjs --self-test | |
| # `shell: bash` is load-bearing here, not tidiness. The DEFAULT shell for | |
| # a `run:` step is `bash -e {0}` with no pipefail, so in `node ... | tee` | |
| # the step takes tee's exit status and a gate that exits 1 passes the job | |
| # silently. Naming the shell gets `bash --noprofile --norc -eo pipefail | |
| # {0}`, which propagates it. | |
| - name: Check | |
| shell: bash | |
| run: node .github/scripts/check-node-floor.mjs | tee -a "$GITHUB_STEP_SUMMARY" | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| # `content/docs/**/*.zh-Hant.mdx` and `meta.zh-Hant.json` are generated | |
| # from the Simplified siblings by `apps/docs/scripts/gen-zh-hant.mjs` and | |
| # committed, because `lib/seo.ts` tells a real translation from an English | |
| # fallback by the presence of a locale-suffixed FILE — a conversion done | |
| # while rendering would leave the locale out of every sitemap entry and | |
| # hreflang cluster. Committed output needs a gate or it drifts: this | |
| # regenerates in memory and compares bytes, so a hand edit, a stale file | |
| # whose source was retired, and a converter upgrade nobody re-ran all fail | |
| # here with the same one-line fix. | |
| # | |
| # Before `type-check` on purpose: it needs no build, and a content drift | |
| # reported as a type error is a wrong first diagnosis. | |
| - name: Generated zh-Hant is current | |
| run: node apps/docs/scripts/gen-zh-hant.mjs --check | |
| - run: pnpm turbo run type-check --continue | |
| - run: pnpm turbo run build | |
| # Reads the BUILT sitemap and asserts its locale composition against an | |
| # oracle derived from `content/docs/`. It has to come after `build` — the | |
| # measurement is taken off the artifact, because importing `sitemap.ts` | |
| # pulls in the whole MDX collection and the `@/` alias. | |
| # | |
| # Not a turbo task on purpose: turbo would hash it against the ci-scripts | |
| # package's own inputs, which do not include `apps/docs/.next/`, so a | |
| # locale regression would replay a cached green. `pnpm turbo run test` | |
| # below still runs this script's `--self-test`, which is what keeps its | |
| # rules provably able to fail. | |
| # | |
| # `shell: bash` is load-bearing, not tidiness. The DEFAULT shell for a | |
| # `run:` step is `bash -e {0}` with no pipefail, so in `node ... | tee` | |
| # the step takes tee's exit status and a gate that exits 1 passes the job | |
| # silently. Naming the shell gets `bash --noprofile --norc -eo pipefail | |
| # {0}`, which propagates it. | |
| - name: Locale surface | |
| shell: bash | |
| run: node .github/scripts/check-locale-surface.mjs | tee -a "$GITHUB_STEP_SUMMARY" | |
| - run: pnpm turbo run test |