-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
62 lines (55 loc) · 1.25 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
60
61
62
image: node:latest
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- build/
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
- doc
- deploy
cypress:
image: cypress/browsers:node16.5.0-chrome94-ff93
stage: test
script:
- env | ( grep YAWIK || echo "ROUTER_BASE=/${CI_PAGES_URL#*://*/}/" ) > .env.local
- yarn
- yarn "test:e2e:ci"
only:
variables:
- $YAWIK_RUN_CYPRESS == "yes"
mkdocs:
stage: doc
image: python:3.8-buster
script:
- pip install -r requirements.txt
- mkdocs build --strict
artifacts:
paths:
- build
pages:
stage: deploy
image: node:lts-slim
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 -r build/docs .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:
- main