-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.57 KB
/
Copy pathci.yml
File metadata and controls
53 lines (44 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
# WHY THIS FILE EXISTS, AND WHY IT IS NOT OPTIONAL
#
# fleetcrown's ci-gate.sh treats "CI green" and "no CI at all" identically —
# both exit 0 and let the deploy proceed. That is a sane default for a repo
# that has not set CI up yet, and it means a site WITHOUT this file deploys
# every push completely unverified while looking exactly like one that passed.
#
# Substrata shipped to production that way. So the scaffold emits this file with
# every new site: the gate has something real to wait for from the first commit.
#
# Runs the same bundle as `npm run verify` locally — one definition of verified.
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}
# A newer push supersedes an older run. ci-gate.sh understands cancelled-and-
# superseded as a clean skip rather than a failure.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: '.nvmrc'
cache: npm
# `npm ci` not `npm install`: the lockfile is the contract, and a resolution
# that drifts from it is exactly how a dependency silently disappears.
- run: npm ci
- name: Type check
run: npm run type-check
- name: Lint
run: npm run lint
# The build is the real test for a content site: a broken import or a bad
# config surfaces here and nowhere earlier.
- name: Build
run: npm run build