-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 1.49 KB
/
deploy.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Analyze, Build and Deploy
on:
push:
branches:
- master
paths:
- "lib/**"
- "test/**"
- "web/**"
- "assets/**"
- "pubspec.yaml"
- ".github/workflows/**"
- "firebase.json"
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: 3.16.0
- name: 📦 Install Dependencies
run: |
flutter pub get
- name: 🛠️ Build the application
run: flutter build web -t lib/main.dart
- name: ⬇️ Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: build
path: build/web
deploy:
name: "Deploy"
runs-on: ubuntu-latest
needs: build
steps:
- name: 📚 Checkout repo
uses: actions/checkout@v3
- name: ⬇️ Download Artifact
uses: actions/download-artifact@master
with:
name: build
path: build/web
- name: 🎯 Deploy to firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_RAINBOWBID_A4892 }}"
channelId: live
projectId: "${{ secrets.FIREBASE_PROJECT_ID }}"