-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (77 loc) · 2.49 KB
/
firebase-hosting-merge.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_HOSTING }}
channelId: live
projectId: slsa-on-blockchain
- uses: google-github-actions/auth@v2
with:
project_id: slsa-on-blockchain
credentials_json: ${{ secrets.FIREBASE_FUNCTIONS }}
- run: |
echo "${{ secrets.FIREBASE_APP_BASE64 }}" | base64 --decode > ./functions/src/serviceAccountKey.json
- name: Deploy upload function
uses: google-github-actions/deploy-cloud-functions@v3
with:
name: upload
runtime: nodejs20
source_dir: ./functions
entry_point: upload
- name: Deploy download function
uses: google-github-actions/deploy-cloud-functions@v3
with:
name: download
runtime: nodejs20
source_dir: ./functions
entry_point: download
- name: Deploy create function
uses: google-github-actions/deploy-cloud-functions@v3
with:
name: create
runtime: nodejs20
source_dir: ./functions
entry_point: create
- name: Deploy update function
uses: google-github-actions/deploy-cloud-functions@v3
with:
name: update
runtime: nodejs20
source_dir: ./functions
entry_point: update
- name: Deploy read function
uses: google-github-actions/deploy-cloud-functions@v3
with:
name: read
runtime: nodejs20
source_dir: ./functions
entry_point: read
- name: Deploy fetch function
uses: google-github-actions/deploy-cloud-functions@v3
with:
name: fetch
runtime: nodejs20
source_dir: ./functions
entry_point: fetch
- name: Deploy deleteOldData function
uses: google-github-actions/deploy-cloud-functions@v3
with:
name: deleteOldData
runtime: nodejs20
source_dir: ./functions
entry_point: deleteOldData