fixed issue with api key (#52) #33
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 & Deploy to Firebase Hosting | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| Build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22.x' | |
| - name: Install web dependencies | |
| run: yarn install | |
| working-directory: ./bs3 | |
| - name: Lint web | |
| run: yarn lint | |
| working-directory: ./bs3 | |
| - name: Build web | |
| run: yarn build | |
| working-directory: ./bs3 | |
| env: | |
| REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }} | |
| REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }} | |
| REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }} | |
| REACT_APP_FIREBASE_STORAGE_BUCKET: ${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }} | |
| REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }} | |
| REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }} | |
| REACT_APP_FIREBASE_MEASUREMENT_ID: ${{ secrets.REACT_APP_FIREBASE_MEASUREMENT_ID }} | |
| - name: Install function dependencies | |
| run: yarn install | |
| working-directory: ./bs3-functions/node-functions | |
| - name: Lint functions | |
| run: yarn lint | |
| working-directory: ./bs3-functions/node-functions | |
| - name: Install Firebase CLI | |
| run: npm install -g firebase-tools | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BS3APP_DFB63 }}' | |
| - name: Deploy functions | |
| run: firebase deploy --only functions --project bs3app-dfb63 --force | |
| working-directory: ./bs3-functions | |
| env: | |
| PERPLEXITY_SONAR_API_KEY: dummy-api-key-change-me | |
| - name: Deploy to Firebase Hosting | |
| uses: FirebaseExtended/action-hosting-deploy@v0 | |
| with: | |
| entryPoint: ./bs3 | |
| repoToken: ${{ secrets.GITHUB_TOKEN }} | |
| firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BS3APP_DFB63 }} | |
| channelId: live | |
| projectId: bs3app-dfb63 | |