title: Unable to deploy a preview channel on PR with firebase github actions
body: <p>I have a monorepo (turbo) and a nextjs app. I changed the yml file, which is generated from firebase, but after all the checks are done in the actions and follow the link I get the following message from firebase<a href="https://i.stack.imgur.com/0wCis.png" rel="nofollow noreferrer">Page Not Found</a>:</p>
  <p>The firebase.json:</p>
  <pre><code>{
  &quot;firestore&quot;: {
      &quot;rules&quot;: &quot;firebase/firestore/firestore.rules&quot;,
      &quot;indexes&quot;: &quot;firebase/firestore/firestore.indexes.json&quot;
  },
  &quot;functions&quot;: {
      &quot;source&quot;: &quot;firebase/functions&quot;
  },
  &quot;hosting&quot;: {
      &quot;public&quot;: &quot;apps/onboarding/out&quot;,
      &quot;ignore&quot;: [&quot;firebase.json&quot;, &quot;**/.*&quot;, &quot;**/node_modules/**&quot;],
      &quot;rewrites&quot;: [
          {
              &quot;source&quot;: &quot;**&quot;,
              &quot;destination&quot;: &quot;/index.html&quot;
          }
      ]
  },
  &quot;storage&quot;: {
      &quot;rules&quot;: &quot;firebase/cloud-storage/storage.rules&quot;
  },
  </code></pre>
  <p>And here is the .yml file:</p>
  <pre><code>name: Build and deploy to Firebase Hosting on PR
  </code></pre>
  <p>on: pull_request</p>
  <p>env:
  NEXT_PUBLIC_FIREBASE_CONFIG: '${{ secrets.NEXT_PUBLIC_FIREBASE_CONFIG }}'
  NEXT_PUBLIC_ENVIRONMENT: development</p>
  <p>jobs:
  install-deps:
  runs-on: ubuntu-latest
  steps:
  ## Checkout current branch
  - uses: actions/checkout@v2</p>
  <pre><code>          ## Setup node
          - name: Use Node.js 16.x
            uses: actions/setup-node@v1
            with:
                node-version: 16.x
  
            ## Cache node modules
          - name: Cache node modules
            id: cache-npm
            uses: actions/cache@v3
            env:
                cache-name: cache-node-modules
            with:
                path: node_modules
                key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
                restore-keys: |
                    v1-${{ runner.os }}-build-${{ env.cache-name }}-
                    v1-${{ runner.os }}-build-
                    v1-${{ runner.os }}-
  
          ## Install dependencies
          - name: Install dependencies
            run: |
                npm ci
  
  lint:
      needs: install-deps
      runs-on: ubuntu-latest
      steps:
          ## Checkout current branch
          - uses: actions/checkout@v2
  
            ## Setup node
          - name: Use Node.js 16.x
            uses: actions/setup-node@v1
            with:
                node-version: 16.x
  
            ## Cache node modules
          - name: Cache node modules
            id: cache-npm
            uses: actions/cache@v3
            env:
                cache-name: cache-node-modules
            with:
                path: node_modules
                key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
                restore-keys: |
                    v1-${{ runner.os }}-build-${{ env.cache-name }}-
                    v1-${{ runner.os }}-build-
                    v1-${{ runner.os }}-
  
          ## Run lint
          - name: Run lint
            run: |
                npm run lint
  
  test:
      needs: install-deps
      runs-on: ubuntu-latest
      steps:
          ## Checkout current branch
          - uses: actions/checkout@v2
  
            ## Setup node
          - name: Use Node.js 16.x
            uses: actions/setup-node@v1
            with:
                node-version: 16.x
  
            ## Cache node modules
          - name: Cache node modules
            id: cache-npm
            uses: actions/cache@v3
            env:
                cache-name: cache-node-modules
            with:
                path: node_modules
                key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
                restore-keys: |
                    v1-${{ runner.os }}-build-${{ env.cache-name }}-
                    v1-${{ runner.os }}-build-
                    v1-${{ runner.os }}-
  
          ## Run test
          - name: Run test
            run: |
                npm run test
  
  build:
      needs: install-deps
      runs-on: ubuntu-latest
      steps:
          ## Checkout current branch
          - uses: actions/checkout@v2
  
            ## Setup node
          - name: Use Node.js 16.x
            uses: actions/setup-node@v1
            with:
                node-version: 16.x
  
            ## Cache node modules
          - name: Cache node modules
            id: cache-npm
            uses: actions/cache@v3
            env:
                cache-name: cache-node-modules
            with:
                path: node_modules
                key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
                restore-keys: |
                    v1-${{ runner.os }}-build-${{ env.cache-name }}-
                    v1-${{ runner.os }}-build-
                    v1-${{ runner.os }}-
  
          ## Build
          - name: Build
            run: |
                npm run build
  
          ## Store artifacts for deployment in case of push in main
          - name: Archive onboarding/out artifacts
            uses: actions/upload-artifact@v3
            with:
                name: preview-build-onboarding
                path: apps/onboarding/out/**
  
          - name: Archive function/lib artifacts
            uses: actions/upload-artifact@v3
            with:
                name: preview-build-functions
                path: firebase/functions/lib/**
  deploy:
      runs-on: ubuntu-latest
  
      env:
          CI_FIREBASE_MESSAGE: ${{ github.event.head_commit.message }} - ${{ github.event.head_commit.url }}/checks
  
      needs: [build, install-deps, lint, test]
      steps:
          ## Checkout current branch
          - uses: actions/checkout@v2
  
          ## Setup node
          - name: Use Node.js 16.x
            uses: actions/setup-node@v1
            with:
                node-version: 16.x
  
          ## Cache node modules
          - name: Cache node modules
            id: cache-npm
            uses: actions/cache@v3
            env:
                cache-name: cache-node-modules
            with:
                path: node_modules
                key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
                restore-keys: |
                    v1-${{ runner.os }}-build-${{ env.cache-name }}-
                    v1-${{ runner.os }}-build-
                    v1-${{ runner.os }}-
  
          - name: Download onboarding/out artifacts
            uses: actions/download-artifact@v3
            with:
                name: preview-build-onboarding
                path: apps/onboarding/out/**
  
          - name: Download function/lib artifacts
            uses: actions/download-artifact@v3
            with:
                name: preview-build-functions
                path: firebase/functions/lib/**
  
          - name: Deploy Preview
            uses: FirebaseExtended/action-hosting-deploy@v0
            with:
                repoToken: '${{ secrets.GITHUB_TOKEN }}'
                firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_******** }}'
                projectId: ********
  </code></pre>
  <p>I have absolutely no clue at the moment why it is failing, so any help would be appreciated!</p>