-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
75 lines (64 loc) · 1.08 KB
/
.gitlab-ci.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
variables:
GITLAB_FEATURES: '${GITLAB_FEATURES},dependency_scanning'
include:
- template: Dependency-Scanning.gitlab-ci.yml
stages:
- build
- test
- deploy
.node:
image: node:16
before_script:
- '[[ -d node_modules ]] || npm ci --progress=false'
cache:
- key:
files:
- package-lock.json
paths:
- node_modules
build:
stage: build
extends: .node
script:
- npm run production
- npm run build:eleventy
artifacts:
paths:
- public
expire_in: 1 day
prettier:
extends: .node
allow_failure: true
stage: test
script:
- npm run prettier-check
eslint:
extends: .node
allow_failure: true
stage: test
script:
- npm run eslint-check
stylelint:
extends: .node
allow_failure: true
stage: test
script:
- npm run stylelint-check
pages:
stage: deploy
script:
- echo "Do nothing"
artifacts:
paths:
- public
only:
- main
build:eleventy:
stage: build
extends: .node
script:
- npm run build:eleventy
artifacts:
paths:
- public
expire_in: 1 day