-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.49 KB
/
firebase_dev.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
name: Build and deploy
on:
push:
branches: [dev]
# Run workflow manually
workflow_dispatch:
jobs:
build_and_deploy:
environment: Development
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Install dependencies
run: npm ci
- name: build dependencies
run: npm run build
env:
CI: false
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}
REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
REACT_APP_FIREBASE_STORAGE_BUCKET: ${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }}
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
- name: Archive production artifact
uses: actions/upload-artifact@main
with:
name: build
path: build
- name: Firebase deploy
uses: FirebaseExtended/action-hosting-deploy@main
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PAYPLAN_DEVELOPMENT }}"
channelId: live
projectId: "${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}"