-
-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (41 loc) · 1.18 KB
/
preview.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: preview
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/preview.yml'
- 'backend/.firebaserc'
- 'backend/firebase.json'
- 'frontend/github_tracker/**'
jobs:
build_and_preview:
timeout-minutes: 5
runs-on: ubuntu-latest
name: hosting 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
entryPoint: backend
expires: 5d
env:
FIREBASE_CLI_PREVIEWS: hostingchannels