-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
45 lines (41 loc) · 984 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
41
42
43
44
45
image:
name: node:20.9-alpine
before_script:
- npm i -g [email protected] @angular/[email protected] [email protected]
variables:
ENVIRONMENT_FILE_CONTENT: $ENVIRONMENT_FILE_OPEN_SOURCE
AUTHFLOW_FILE_CONTENT: $AUTHFLOW_FILE_OPEN_SOURCE
PARAMS_FILE_CONTENT: $PARAMS_FILE_OPEN_SOURCE
CSP_VARIABLES: $CSP_VARIABLES_OPEN_SOURCE
stages:
- build
- deploy
build:
stage: build
cache:
paths:
- node_modules/
- dist/
environment:
name: open-source
script:
- npm i
- npm run config "--environment=open-source"
- ng build "--configuration=open-source"
only:
refs:
- master
deploy:
stage: deploy
cache:
paths:
- dist/
environment:
name: open-source
script:
- sed -i "s|{{BACKEND_GATEWAY}}|$CSP_VARIABLES|g" firebase.json # Replace placeholder with actual URL
- cat firebase.json
- firebase deploy --project pole-emploi-trad-open --token $FIREBASE_TOKEN
only:
refs:
- master