-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (44 loc) · 1.55 KB
/
deploy.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
name: Deploy to Firebase Hosting
on:
push:
branches:
- main # Change this to the name of your default branch if it's not 'main'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: '3.19.1' # Explicitly specify Flutter version
- name: Install Firebase CLI
run: |
curl -sL https://firebase.tools | bash
- name: Update version numbers
run: |
chmod +x update_version.sh
echo "Updating version number for spotkin_flutter web app"
./update_version.sh
- name: Generate production config
run: |
mkdir -p assets
cat << EOF > assets/config.json
{
"SPOTIFY_CLIENT_SECRET": "${{ secrets.SPOTIFY_CLIENT_SECRET }}",
"SPOTIFY_CLIENT_ID": "${{ secrets.SPOTIFY_CLIENT_ID }}",
"SPOTIFY_REDIRECT_URI": "${{ secrets.SPOTIFY_REDIRECT_URI }}",
"SPOTIFY_SCOPE": "${{ secrets.SPOTIFY_SCOPE }}",
"BACKEND_URL": "${{ secrets.BACKEND_URL }}"
}
EOF
# Debug: Print the contents of the config file (be careful with secrets!)
echo "Generated config file contents:"
cat assets/config.json
- name: Build Spotkin web app
run: |
flutter config --enable-web
flutter pub get
flutter build web --release
firebase deploy --only hosting --project spotkin-fd416 --token ${{ secrets.FIREBASE_TOKEN }}