-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
48 lines (44 loc) · 1.11 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
stages:
- test
- build
- deploy
include:
- template: SAST.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
- template: License-Scanning.gitlab-ci.yml
lint:
image: node:latest
stage: test
before_script:
- yarn install --pure-lockfile
script:
- yarn lint
- yarn run prettier --check "src/**/*.{js,ts,vue}"
buildPackage:
image: buildkite/puppeteer:latest
stage: build
script:
- apt update && apt install curl -y
- curl "https://gitlab.com/api/v4/projects/18158864/releases" > public/changelog.json
- yarn install --pure-lockfile
- yarn build
artifacts:
paths:
- dist
pages: # the deploy job must be named pages
image: node:latest
variables:
GIT_STRATEGY: none
stage: deploy
when: manual
needs:
- buildPackage
script:
- mv dist public # rename the dist folder (result of npm run build)
# activate gzip support
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
artifacts:
paths:
- public # artifact path must be /public for GitLab Pages to pick it up
only:
- master