-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
40 lines (38 loc) · 1023 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
.build-base:
image: node:20.17.0
script:
- npm ci
- npm run build
build:
extends:
- .build-base
stage: build
variables:
C0_BASE_PATH: /-/development/landing-page/-/jobs/$CI_JOB_ID/artifacts/out
after_script:
- |
echo -e "\e[0Ksection_start:`date +%s`:glpa_summary\r\e[0KHeader of the summary"
echo "Preview available at https://code0-tech.gitlab.io/-/development/landing-page/-/jobs/$CI_JOB_ID/artifacts/out/index.html"
echo -e "\e[0Ksection_end:`date +%s`:glpa_summary\r\e[0K"
environment:
name: preview/$CI_COMMIT_REF_SLUG
url: https://code0-tech.gitlab.io/-/development/landing-page/-/jobs/$CI_JOB_ID/artifacts/out/index.html
auto_stop_in: 7 days
artifacts:
paths:
- out
expire_in: 7 days
rules:
- if: $C0_GH_REF != "refs/heads/main"
pages:
extends:
- .build-base
stage: deploy
after_script:
- rm -rf public
- mv out public
artifacts:
paths:
- public
rules:
- if: $C0_GH_REF == "refs/heads/main"