-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.5 KB
/
deploy-ssr-push.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
36
37
38
39
40
41
42
43
44
45
46
47
name: Deploy Cloud Functions
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Create SA key
run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}' > $HOME/gcloud.json
- name: Cache Project npm dependencies
uses: actions/cache@v2
with:
path: "./node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Project Deps
run: npm i
- name: Cache CloudFunctions npm dependencies
uses: actions/cache@v2
with:
path: "./functions/node_modules"
key: ${{ runner.os }}-funcs_node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-funcs_node-
- name: Install Functions deps
run: npm --prefix functions/ i
- name: Build Angular Universal
run: npm run build:ssr-ci
- name: Deploy Cloud Functions
run: |
export GOOGLE_APPLICATION_CREDENTIALS=$HOME/gcloud.json
npx firebase-tools deploy --only functions,hosting --json