-
Notifications
You must be signed in to change notification settings - Fork 10
73 lines (68 loc) · 2.21 KB
/
workflow1.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_web:
name: Build Flutter (Web)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: 'dev'
- name: flutter upgrade
run: flutter upgrade
- name: get Version
run: flutter --version
- run: flutter pub get
- run: flutter config --enable-web
- name: Make envfile
uses: SpicyPizza/create-envfile@v1.3
with:
DEBUG: false
envkey_my_admin_dashboard_token: ${{ secrets.ADMIN_DASHBOARD_TOKEN }}
envkey_my_admin_dashboard_clientId: ${{ secrets.ADMIN_DASHBOARD_CLIENTID }}
envkey_my_admin_dashboard_clientSecret: ${{ secrets.ADMIN_DASHBOARD_CLIENTSECRET }}
envkey_my_admin_dashboard_redirectUrl: ${{ secrets.ADMIN_DASHBOARD_REDIRECTURL }}
envkey_my_apiKey: ${{ secrets.APIKEY }}
envkey_my_appId: ${{ secrets.APPID }}
envkey_my_messagingSenderId: ${{ secrets.MESSAGING_SENDER_ID }}
envkey_my_projectId: admin-dashboard-b9503
file_name: env_var.env
fail_on_empty: true
- name: build_app
run: flutter build web
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: web-build
path: build/web
deploy_web:
name: Deploy Web to Firebase Hosting
needs: build_web
runs-on: ubuntu-latest
env:
admin_dashboard_token: NOHA
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: web-build
path: build/web
- name: npx firebase-tools
run: npx firebase-tools
- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ADMIN_DASHBOARD_B9503 }}'
adminDashboardToken: '${{ secrets.ADMIN_DASHBOARD_TOKEN}}'
projectId: admin-dashboard-b9503
channelId: live