forked from EOS-uiux-Solutions/user-story
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
41 lines (35 loc) · 732 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
stages:
- test
- deploy
image: node:10.15.0
# Common script to all jobs
default:
before_script:
- npm install
- 'echo "$CONFIG_JSON" > src/config.json'
# Lets cache the npm install per stages in the current branch
cache:
key: '$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG'
paths:
- node_modules/
# Start the jobs
test_lints_sass:
stage: test
script:
- npm run test:sass
test_lints_js:
stage: test
script:
- npm run test:js
pages:
stage: deploy
script:
- npm run build
- rm -rf public
- mv build public
- cp public/index.html public/404.html
artifacts:
paths:
- public # mandatory, other folder won't work
only:
- master # or dev, the branch you want to publish