-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
60 lines (60 loc) · 1.97 KB
/
cloudbuild.yaml
File metadata and controls
60 lines (60 loc) · 1.97 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
54
55
56
57
58
59
60
steps:
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
id: 'enable-apis'
entrypoint: 'bash'
allowFailure: true
args:
- '-c'
- |
gcloud services enable \
firebasestorage.googleapis.com \
firebaseextensions.googleapis.com \
cloudfunctions.googleapis.com \
cloudbuild.googleapis.com \
artifactregistry.googleapis.com \
run.googleapis.com \
eventarc.googleapis.com \
pubsub.googleapis.com \
storage.googleapis.com \
translate.googleapis.com \
cloudbilling.googleapis.com \
--project=$PROJECT_ID
- name: 'node:24'
id: 'install-deps'
entrypoint: npm
args: [ 'install' ]
- name: 'node:24'
id: 'install-functions-deps'
entrypoint: npm
args: [ '--prefix', 'functions', 'install', '--platform=linuxmusl' ]
- name: ghcr.io/lessify/firebase:edge
id: 'Pull Firebase Apps SDK Config'
args: [ 'apps:sdkconfig', '--project=$PROJECT_ID', 'web', '--out=src/environments/firebase-config-tmp.json' ]
- name: 'node:24'
id: 'Copy Firebase Apps SDK Config'
args: [ 'mv', '-f', 'src/environments/firebase-config-tmp.json', 'src/environments/firebase-config.json' ]
- name: 'node:24'
id: 'version-generate'
entrypoint: npm
args:
- 'run'
- 'version:generate'
env:
- 'COMMIT_SHA=$COMMIT_SHA'
- name: 'node:24'
id: 'build-prod'
entrypoint: npm
args:
- 'run'
- 'build:prod'
env:
- 'LOCALESS_AUTH_CUSTOM_DOMAIN=${_LOCALESS_AUTH_CUSTOM_DOMAIN}'
- 'LOCALESS_AUTH_PROVIDERS=${_LOCALESS_AUTH_PROVIDERS}'
- 'LOCALESS_LOGIN_MESSAGE=${_LOCALESS_LOGIN_MESSAGE}'
- 'LOCALESS_UNSPLASH_ENABLE=${_LOCALESS_UNSPLASH_ENABLE}'
# deploy to firebase
- name: ghcr.io/lessify/firebase:edge
id: 'firebase-deploy'
args: [ 'deploy', '--project=$PROJECT_ID', '--only=hosting,functions,storage,firestore', '--force' ]
options:
logging: CLOUD_LOGGING_ONLY