-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
53 lines (48 loc) · 1.08 KB
/
.gitlab-ci.yml
File metadata and controls
53 lines (48 loc) · 1.08 KB
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
image: node:22
default:
interruptible: true
stages:
- build
- deploy
build:
stage: build
timeout: 2 minutes
before_script:
- yarn install --ignore-scripts
- apt-get update -y && apt-get install -y zip
script:
- NODE_ENV=production yarn ci
- cp dist/index.html dist/404.html
- cd dist && zip -r ../soapbox.zip . && cd ..
artifacts:
paths:
- soapbox.zip
review:
stage: deploy
timeout: 5 minutes
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://$CI_COMMIT_REF_SLUG.git.soapbox.pub
before_script:
- apt-get update -y && apt-get install -y unzip
script:
- unzip soapbox.zip -d dist
- npx -y surge dist $CI_COMMIT_REF_SLUG.git.soapbox.pub
allow_failure: true
when: manual
pages:
stage: deploy
timeout: 30 seconds
before_script:
- apt-get update -y && apt-get install -y unzip
script:
# artifacts are kept between jobs
- unzip soapbox.zip -d public
variables:
NODE_ENV: production
artifacts:
paths:
- public
only:
variables:
- $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME