-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
83 lines (77 loc) · 1.83 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
diagnostics:
stage: .pre
image: node:slim
cache:
key:
files:
- package-lock.json
paths:
- .npm
before_script:
- npm ci --cache .npm --prefer-offline
script:
- npm run check
- npm run lint
artifacts:
paths:
- node_modules
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"'
when: never
- if: '$CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
linkcheck:
stage: .pre
image:
name: lycheeverse/lychee
entrypoint: ['']
cache:
key: $CI_JOB_NAME
paths:
- .lycheecache
script:
- lychee --cache -- README.md 'src/content/**/*.yml'
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: manual
allow_failure: true
- if: '$CI_PIPELINE_SOURCE == "schedule"'
.artifacts:
artifacts:
paths:
- public
.build:
extends: .artifacts
stage: build
image: node:slim
script:
- npm run build
after_script:
- mv build public
build:
extends: .build
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"'
when: never
- if: '$CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
build:secure:
extends: .build
tags:
- secure
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
pages:
tags:
- secure
extends: .artifacts
stage: deploy
image: busybox
variables:
GIT_STRATEGY: none
script: 'true'
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"'