Skip to content

Workflow file for this run

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: |
echo '{
"SPOTIFY_CLIENT_ID": "'$SPOTIFY_CLIENT_ID'",
"SPOTIFY_CLIENT_SECRET": "'$SPOTIFY_CLIENT_SECRET'",
"SPOTIFY_REDIRECT_URI": "'$SPOTIFY_REDIRECT_URI'",
"SPOTIFY_SCOPE": "'$SPOTIFY_SCOPE'",
"BACKEND_URL": "'$BACKEND_URL'"
}' > 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 }}