-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.19 KB
/
firebase-hosting.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
name: Firebase Hosting Deploy
on:
push:
branches:
- main # Trigger on pushes to the main branch. Change this as needed.
pull_request: # Temporarily use it to test
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
- name: Clean build
run: flutter clean
- name: Install dependencies
run: flutter pub get
- name: Set environment variables
run: |
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> .env
echo "AMPLIFY_CONFIG=${{ secrets.AMPLIFY_CONFIG }}" >> .env
- name: Build Flutter Web
run: flutter build web
# The web gives error GET https://composites-ai.web.app/assets/.env 404 (Not Found)
# Let's use local deploy for now
# TODO: fix the web error for Deploy to Firebase Hosting
# - name: Deploy to Firebase Hosting
# env:
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
# run: |
# npm install -g firebase-tools
# firebase deploy