-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
53 lines (46 loc) · 887 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
53
image: node:14.6.0 # change to match your node version
cache:
paths:
- uberpage/node_modules/
before_script:
- cd uberpage
- npm ci
stages:
- test
- build
- deploy
lint:
stage: test
script:
- CI=true npm run lint
test:
stage: test
script:
- CI=true npm run test
build:
stage: build
script:
- ../scripts/adjust_homepage.sh "https://stegschreck.gitlab.io"
- cp -f src/data.gitlab.js src/data.js
- CI=true npm run build
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- uberpage/build
only:
- master
pages:
stage: deploy
environment:
name: production
url: https://stegschreck.gitlab.io
dependencies:
- build
script:
- rm -rf ../public
- mv build ../public
artifacts:
paths:
- public # GitLab pages serve from a 'public' directory
only:
- master # run on master branch