Github build & deploy workflow



  • I am trying to build a GitHub workflow for my Quasar PWA. When I push to my GitHub repository, I want my app to be built and then deployed to Firebase Hosting. However, I can’t get it to work.

    Right now, I have the following workflow file set up, which was based on this one:
    https://github.com/analythium/github-pages-quasar

    It fails to build, as it can’t find the Firebase configuration file (which is not uploaded to GitHub because it contains sensitive details). What should I do to get this to work?

    name: Deploy to Firebase Hosting on merge
    'on':
      push:
        branches:
          - master
    jobs:
      build_and_deploy:
        runs-on: ubuntu-latest
        steps:
          - name: Checkout
            uses: actions/checkout@v2
          - name: Setup Node
            uses: actions/setup-node@v1
            with:
              node-version: '10.x'
          - name: Cache
            uses: actions/cache@v1
            with:
              path: ~/.npm
              key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
              restore-keys: |
                ${{ runner.os }}-node-
          - name: Install 1
            run: npm install
          - name: Install 2
            run: npm ci
          - name: Build
            run: npm run build:pwa
          - uses: FirebaseExtended/action-hosting-deploy@v0
            with:
              repoToken: '${{ secrets.GITHUB_TOKEN }}'
              firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_REBEL_TOOLS }}'
              channelId: live
              projectId: rebel-tools
            env:
              FIREBASE_CLI_PREVIEWS: hostingchannels
    

Log in to reply