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
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,18 @@ jobs:
- name: Install
run: npm ci

# sync-widgets.mjs is deliberately not run here. It reads ../stackyard,
# which is not present on a runner. The copies under public/ are committed.
# The development and changelog pages are generated from the application
# repository at build time. Without it they fall back to a link, and the
# checks below would pass against a site two pages short of the real one.
- name: Fetch the application repository
run: git clone --depth 1 https://github.com/SandObserver/stackyard.git "$RUNNER_TEMP/stackyard"

# sync-widgets.mjs is deliberately not run here. The copies under public/
# are committed, so the previews do not depend on this checkout.
- name: Build
run: npm run build
env:
STACKYARD_REPO: ${{ runner.temp }}/stackyard

- name: Check build output
run: npm run check
15 changes: 15 additions & 0 deletions scripts/check-dist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ report('secrets', secretHits);
/* House style. */
report('style', files.filter((f) => f.startsWith('src') && read(f).includes('—')));

/* The development and changelog pages are generated from the application
repository. When that checkout is absent they render a link instead, which
is a valid page and would otherwise pass every check above. */
const generated = [
['dist/docs/development/index.html', 'CONTRIBUTING.md'],
['dist/docs/changelog/index.html', 'CHANGELOG.md'],
];
report(
'genpage',
generated
.filter(([f]) => existsSync(f))
.filter(([f]) => read(f).includes('was not available for this build'))
.map(([f, src]) => `${f} fell back: ${src} was not read. Set STACKYARD_REPO.`),
);

/* The placeholder domain must never ship. */
report('domain', html.filter((f) => read(f).includes('stackyard.example')).map((f) => relative(DIST, f)));

Expand Down