-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (63 loc) · 1.92 KB
/
firebase.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
name: "SyncSilo Hosting"
on:
push:
paths:
- "src/**"
- "firebase.json"
- "public/**"
- "index.html"
- "package.json"
branches:
- "dev"
pull_request:
types: [closed]
branches: [main]
workflow_dispatch:
jobs:
beta_preview:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == github.triggering_actor && github.ref_name == 'dev' }}
steps:
- name: "Checkout to the branch"
uses: actions/checkout@v3
- name: "Node.js setup"
uses: actions/setup-node@v3
with:
node-version: 18
- name: "Install Dependencies (Clean)"
run: npm ci
- name: "Build the project"
run: npm run build
- name: Deploy to firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelID: beta
target: syncsilo-57b5e
expires: 2d
projectID: anweshan-cybrix
live_preview:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.ref_name == 'main') }}
steps:
- name: "Checkout to the branch"
uses: actions/checkout@v3
with:
ref: "main"
- name: "Node.js setup"
uses: actions/setup-node@v3
with:
node-version: 18
- name: "Install Dependencies (Clean)"
run: npm ci
- name: "Build the project"
run: npm run build
- name: Deploy to firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelID: live
target: syncsilo-57b5e
projectID: anweshan-cybrix