-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
40 lines (38 loc) · 881 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
image: node:18.20.0
build:
stage: build
cache:
- key:
files:
- yarn.lock
paths:
- .yarn-cache/
before_script:
- echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
- echo 'yarn-offline-mirror-pruning true' >> .yarnrc
- yarn install --frozen-lockfile
script:
- yarn build
rules:
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
pages:
stage: build
cache:
- key:
files:
- yarn.lock
paths:
- .yarn-cache/
before_script:
- echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
- echo 'yarn-offline-mirror-pruning true' >> .yarnrc
- yarn install --frozen-lockfile
script:
- yarn build
- cp -a dist/. public/
- echo '/* /index.html 200' > public/_redirects
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH