-
-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (39 loc) · 1.12 KB
/
hosting.yml
File metadata and controls
41 lines (39 loc) · 1.12 KB
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
name: hosting
on:
push:
branches:
- main
paths:
- '.github/workflows/hosting.yml'
- 'backend/.firebaserc'
- 'backend/firebase.json'
- 'frontend/github_tracker/**'
jobs:
build_and_deploy:
timeout-minutes: 5
runs-on: ubuntu-latest
name: deployment of github-tracker
steps:
- uses: actions/checkout@v2.5.0
with:
lfs: 'true'
- uses: subosito/flutter-action@v2.8.0
with:
channel: 'stable'
- name: Build web app
run: |
cd frontend/github_tracker
flutter pub get
flutter pub run build_runner build
flutter build web
- name: Move frontend app to backend hosting
run: |
mkdir backend/public/
mv frontend/github_tracker/build/web/* backend/public/
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GITHUB_TRACKER_B5C54 }}'
projectId: github-tracker-b5c54
channelId: live
entryPoint: backend