Skip to content

Merge pull request #81 from CityOfLosAngeles/uncomment-sarif #20

Merge pull request #81 from CityOfLosAngeles/uncomment-sarif

Merge pull request #81 from CityOfLosAngeles/uncomment-sarif #20

# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
# Flutter and .env config was not auto-generated
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- development
jobs:
build_and_deploy:
environment: development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/marketplace/actions/flutter-action
- name: Setup Flutter
# SHA for v2.10.0
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
flutter-version: '3.13.2'
channel: 'stable'
cache: true
- run: flutter pub get
- run: flutter config --enable-web
- run: |
touch .env
echo AUTH0_DOMAIN=${{ secrets.AUTH0_DOMAIN }} >> .env
echo CLIENT_ID=${{ secrets.CLIENT_ID }} >> .env
echo REDIRECT_URI=${{ secrets.REDIRECT_URI }} >> .env
echo CLOUD_FUNCTIONS_URL=${{ secrets.CLOUD_FUNCTIONS_URL }} >> .env
echo SA_EMAIL=${{ secrets.SA_EMAIL }} >> .env
echo SA_SECRET_KEY="${{ secrets.SA_SECRET_KEY }}" >> .env
- run: flutter build web --dart-define-from-file=.env
- name: Update .firebaserc
run: |
old_project="DEFAULT_PROJECT"
new_project="${{secrets.DEFAULT_PROJECT}}"
sed -i "s/$old_project/$new_project/g" .firebaserc
old_hosting="HOSTING_PROJECT"
new_hosting="${{secrets.HOSTING_PROJECT}}"
sed -i "s/$old_hosting/$new_hosting/g" .firebaserc
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MY_ACCOUNT_DEV_402917 }}'
channelId: live
projectId: my-account-dev-402917
target: angeleno-my-account-dev-402917