Minor UI Updates #237
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 PR | |
on: | |
pull_request: | |
paths: | |
- 'lib/**' | |
- 'web/**' | |
- 'pubspec.*' | |
jobs: | |
build_and_preview: | |
if: '${{ github.event.pull_request.head.repo.full_name == github.repository && | |
github.event.pull_request.draft == false }}' | |
runs-on: ubuntu-latest | |
environment: development | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/marketplace/actions/flutter-action | |
- name: Setup Flutter | |
# SHA for v2.16.0 | |
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 | |
with: | |
flutter-version: '3.22.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.PREVIEW_HOSTING_URL }} >> .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 | |
echo ENVIRONMENT="${{ secrets.ENVIRONMENT }}" >> .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 }} | |
projectId: my-account-dev-402917 | |