Add missing env variables to builder frontend workflow #2
Workflow file for this run
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: | |
| - GH_actions_deploy_pipeline | |
| 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 | |
| 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' | |
| cache: 'npm' | |
| - 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 |