36 lines
1021 B
YAML
36 lines
1021 B
YAML
name: site
|
|
|
|
# The cluster serves what is committed in k8s/site/ — so CI just enforces that
|
|
# k8s/site/ is exactly what the generator produces from commands/ + src/.
|
|
# If this job fails, run `npm run build` and commit the result.
|
|
|
|
on:
|
|
push:
|
|
branches: ["**"]
|
|
pull_request:
|
|
|
|
jobs:
|
|
generated-is-current:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:22-alpine
|
|
steps:
|
|
# git before checkout: without the binary checkout silently falls back
|
|
# to an archive download and the workspace has no .git to diff against
|
|
- name: install git
|
|
run: apk add --no-cache git
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: npm ci --no-audit --no-fund
|
|
- run: npm run build
|
|
|
|
- name: generated output is committed
|
|
run: |
|
|
git add -A k8s/site
|
|
if ! git diff --staged --quiet; then
|
|
echo "k8s/site/ is not in sync with commands/ + src/ — run 'npm run build' and commit:"
|
|
git diff --staged --stat
|
|
exit 1
|
|
fi
|