Skip to content

ingredient form submit #57

ingredient form submit

ingredient form submit #57

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: |
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 }}