-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
53 lines (45 loc) · 1.64 KB
/
Copy pathbuildspec.yml
File metadata and controls
53 lines (45 loc) · 1.64 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
version: 0.2
phases:
install:
runtime-versions:
nodejs: 22 # Keep in step with .nvmrc and package.json "engines"
commands:
- echo "Installing dependencies..."
- npm ci
# `npm run lint` below type-lints the CDK sources against
# infra/tsconfig.json, and there are no npm workspaces, so infra's own
# dependencies have to be installed too.
- npm --prefix infra ci
build:
commands:
# Same gate, in the same order, as .github/workflows/ci.yml so CodeBuild
# and GitHub Actions can never disagree about whether a commit is good.
- echo "Checking..."
- npm run lint
- npm run typecheck
- npm run format:check
- npm test
- echo "Building..."
- npm run build
# Cache npm's content-addressable store, not node_modules: `npm ci` deletes
# node_modules before every install, so caching it only costs transfer time.
cache:
paths:
- /root/.npm/**/*
artifacts:
files:
- "**/*"
base-directory: dist # Vite's default output folder
discard-paths: no # keep folder structure inside dist
# NOTE: this artifact carries no cache-control metadata. The immutable
# `assets/` vs. no-cache `index.html` policy lives in exactly one place —
# the CDK BucketDeployment pair in infra/lib/static-site-stack.ts — which is
# the supported deployment path (`npm run deploy`). Anything that publishes
# this artifact directly must reproduce that policy itself.
# Optional: if you want to produce reports (e.g. for tests) later
# reports:
# vite-coverage-report:
# files:
# - 'coverage/**'
# base-directory: coverage
# file-format: 'SIMPLE-COVERAGE'