forked from subugoe/tido
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
59 lines (53 loc) · 1.09 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
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
stages:
- build
- test:e2e
- deploy
build:
image: node:18
stage: build
script:
- bash .ci-scripts/build.sh
artifacts:
paths:
- dist/
expire_in: 1 mos
test:e2e:
image: cypress/browsers:node-20.12.2-chrome-124.0.6367.60-1-ff-125.0.2-edge-124.0.2478.51-1
stage: test:e2e
except:
- main
script:
- bash .ci-scripts/build.sh
- npm run serve:prod & npm run test:e2e
artifacts:
when: always
paths:
- tests/cypress/videos/**/*.mp4
- tests/cypress/screenshots/**/*.png
expire_in: 1 day
pages:
image: alpine:latest
stage: deploy
when: always
script:
- sh .ci-scripts/install-deps.sh
- bash .ci-scripts/update-artifacts.sh
environment:
name: $CI_COMMIT_REF_SLUG
url: https://subugoe.pages.gwdg.de/emo/tido/${CI_COMMIT_REF_SLUG}/
on_stop: stop_env
artifacts:
name: "$CI_COMMIT_SHORT_SHA"
paths:
- public
stop_env:
stage: deploy
script:
- echo "Remove branch env"
environment:
name: $CI_COMMIT_REF_SLUG
action: stop