-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
cloudbuild.yaml
35 lines (35 loc) · 1.41 KB
/
cloudbuild.yaml
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
steps:
- name: 'node:20'
id: 'install-deps'
entrypoint: npm
args: ['install']
- name: 'node:20'
id: 'install-functions-deps'
entrypoint: npm
args: ['--prefix', 'functions', 'install', '--platform=linuxmusl']
- name: 'node:20'
id: 'build-prod'
entrypoint: npm
args:
- 'run'
- 'build:prod'
env:
- 'LOCALESS_FIREBASE_PROJECT_ID=${_LOCALESS_FIREBASE_PROJECT_ID}'
- 'LOCALESS_FIREBASE_APP_ID=${_LOCALESS_FIREBASE_APP_ID}'
- 'LOCALESS_FIREBASE_STORAGE_BUCKET=${_LOCALESS_FIREBASE_STORAGE_BUCKET}'
- 'LOCALESS_FIREBASE_API_KEY=${_LOCALESS_FIREBASE_API_KEY}'
- 'LOCALESS_FIREBASE_AUTH_DOMAIN=${_LOCALESS_FIREBASE_AUTH_DOMAIN}'
- 'LOCALESS_FIREBASE_MESSAGING_SENDER_ID=${_LOCALESS_FIREBASE_MESSAGING_SENDER_ID}'
- 'LOCALESS_FIREBASE_MEASUREMENT_ID=${_LOCALESS_FIREBASE_MEASUREMENT_ID}'
- 'LOCALESS_AUTH_CUSTOM_DOMAIN=${_LOCALESS_AUTH_CUSTOM_DOMAIN}'
- 'LOCALESS_AUTH_PROVIDERS=${_LOCALESS_AUTH_PROVIDERS}'
- 'LOCALESS_LOGIN_MESSAGE=${_LOCALESS_LOGIN_MESSAGE}'
# deploy to firebase
- name: ghcr.io/lessify/firebase:edge
id: 'firebase-deploy'
args: ['deploy', '--project=$PROJECT_ID', '--only=hosting,functions,storage,firestore', '--force']
- name: 'gcr.io/cloud-builders/gsutil'
id: 'gsutil-cors'
args: ['cors', 'set', 'cors.json', 'gs://${_LOCALESS_FIREBASE_STORAGE_BUCKET}']
options:
logging: CLOUD_LOGGING_ONLY