forked from PaloAltoNetworks/pan.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
58 lines (52 loc) · 1.26 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
image: docker.art.code.pan.run/build-tools--image-node:16.ep1
cache:
paths:
- node_modules/
stages:
- 📦 publish
- screenshot
pages:
stage: 📦 publish
script:
- echo "$GL_PAGES_URL"
- echo "$GL_PAGES_BASE_URL"
- yarn install
- yarn run build
- mv build public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == "master"
variables:
GL_PAGES_URL: $GL_PAGES_URL
GL_PAGES_BASE_URL: $GL_PAGES_BASE_URL
environment:
name: production/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}
url: https://${CI_PROJECT_NAMESPACE}.docs.pan.run
🤔 pages:preview:
stage: 📦 publish
script:
- yarn install
- yarn run build
- mv build public
artifacts:
paths:
- public
rules:
- if: $CI_MERGE_REQUEST_IID
environment:
name: preview/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}
url: https://${CI_PROJECT_NAMESPACE}.docs.pan.run/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts/public/index.html
on_stop: 😢 pages:preview:stop
😢 pages:preview:stop:
stage: 📦 publish
rules:
- if: $CI_MERGE_REQUEST_IID
when: manual
allow_failure: true
environment:
name: preview/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}
action: stop
script:
- echo "👋 bye"