Results editor bug fix and disable save button during save #7
This file contains hidden or 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
| name: Build and Deploy to Firebase Hosting | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'builder-frontend/**' | |
| env: | |
| PROJECT_ID: 'benefit-decision-toolkit-play' | |
| WORKLOAD_IDENTITY_PROVIDER: 'projects/1034049717668/locations/global/workloadIdentityPools/github-actions-google-cloud/providers/github' | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| # Add these permissions for Workload Identity Federation | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Configure Workload Identity Federation and generate an access token. | |
| # | |
| # See https://github.com/google-github-actions/auth for more options, | |
| # including authenticating via a JSON credentials file. | |
| - id: 'auth' | |
| name: 'Authenticate to Google Cloud' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| workload_identity_provider: '${{ env.WORKLOAD_IDENTITY_PROVIDER }}' | |
| service_account: cicd-build-deploy-api@benefit-decision-toolkit-play.iam.gserviceaccount.com | |
| project_id: ${{ env.PROJECT_ID }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Cache node modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: builder-frontend/node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('builder-frontend/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| cache: 'npm' | |
| cache-dependency-path: 'builder-frontend/package-lock.json' | |
| - name: Install dependencies | |
| working-directory: builder-frontend | |
| run: npm ci | |
| - name: Build application | |
| working-directory: builder-frontend | |
| run: npm run build | |
| env: | |
| VITE_API_URL: ${{ secrets.VITE_API_URL}} | |
| VITE_SCREENER_BASE_URL: ${{ secrets.VITE_SCREENER_BASE_URL}} | |
| VITE_API_KEY: ${{ secrets.VITE_API_KEY}} | |
| VITE_AUTH_DOMAIN: ${{ secrets.VITE_AUTH_DOMAIN}} | |
| VITE_PROJECT_ID: ${{ secrets.VITE_PROJECT_ID}} | |
| VITE_STORAGE_BUCKET: ${{ secrets.VITE_STORAGE_BUCKET}} | |
| VITE_MESSAGING_SENDER_ID: ${{ secrets.VITE_MESSAGING_SENDER_ID}} | |
| VITE_APP_ID: ${{ secrets.VITE_APP_ID}} | |
| VITE_MEASUREMENT_ID: ${{ secrets.VITE_MEASUREMENT_ID}} | |
| - name: Install Firebase CLI | |
| run: npm install -g firebase-tools | |
| - name: Deploy to Firebase Hosting | |
| run: firebase deploy --only hosting:builder-frontend |