-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (46 loc) · 938 Bytes
/
.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
# This file is a template, and might need editing before it works on your project.
image: node:latest
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
# Default cache directory from https://classic.yarnpkg.com/en/docs/install-ci/#gitlab.
- node_modules/
# Enables git-lab CI caching. Both .cache and public must be cached, otherwise builds will fail.
- .cache/
- public/
before_script:
- cd lib/
stages:
- build
- test
- pages
build:
stage: build
script:
- npm install
- npm run build
artifacts:
paths:
- lib
test:
stage: test
script:
- npm install
- npm run test
pages:
stage: pages
script:
- cd ../pages
- npm install
- ./node_modules/.bin/gatsby build --prefix-paths
- rm -rf ../public
- mv public ..
- cd ../lib
- npm install
- npm run build
- npm run storybook:build
artifacts:
paths:
- public
only:
- master