-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
59 lines (52 loc) · 1.45 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
image: node:lts-slim
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
workflow:
rules:
- if: $CI_COMMIT_BRANCH
variables:
NPM_TOKEN: ${CI_JOB_TOKEN}
VUE_APP_I18N_FALLBACK_LOCALE: de
VUE_APP_I18N_SUPPORTED_LOCALE: en,de
stages:
- test
- release
- deploy
cypress:
image: cypress/browsers:node16.13.0-chrome95-ff94
stage: test
script:
- env | ( grep YAWIK || echo "ROUTER_BASE=/${CI_PAGES_URL#*://*/}/" ) > .env.local
- CYPRESS_CACHE_FOLDER=./tmp/cypress yarn
- CYPRESS_CACHE_FOLDER=./tmp/cypress yarn "test:e2e:ci"
only:
variables:
- $YAWIK_APPLICATION_FORM_ACTION == "https://form2mail.yawik.org/sendmail"
publish:
stage: release
script:
- env | ( grep YAWIK && yarn && yarn semantic-release || echo "skip semantic-release" ) > /dev/null
only:
variables:
- $YAWIK_APPLICATION_FORM_ACTION == "https://form2mail.yawik.org/sendmail"
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
pages:
stage: deploy
script:
- env | ( grep YAWIK_ROUTER_BASE || echo "ROUTER_BASE=/${CI_PAGES_URL#*://*/}/" ) > .env.local
- env | ( grep YAWIK || echo -n "" ) >> .env.local
- yarn
- yarn build
- mkdir .public
- cp -r dist/spa/* .public
- cp dist/spa/index.html .public/404.html
- rm -Rf public
- mv .public public
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
artifacts:
paths:
- public
only:
- master