Problems with deployment to Firebase with GitHub Actions

I’m completely new to actions as well as to CI in general so I suppose it is a trivial issue.

Build works fine but it doesn’t seem to be able to find the dist folder at deployment job.

Run w9jds/firebase-action@master
/usr/bin/docker run --name c1a2cf98151a2fb4a918419d4caa8f1d713_bdbdad --label 430c1a --workdir /github/workspace --rm -e FIREBASE_TOKEN -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_URL -e GITHUB_API_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/CITests/CITests":"/github/workspace" 430c1a:2cf98151a2fb4a918419d4caa8f1d713 deploy --only hosting

=== Deploying to 'ci-test-5705e'...

i deploying hosting

Error: Specified public directory 'dist/TestCI' does not exist, can't deploy hosting to site ci-test-5705e

My script looks like this:

name: Build and Deploy

    name: Build
    runs-on: ubuntu-latest
      - name: Checkout Repo
        uses: actions/checkout@master
      - name: Install Dependencies
        run: npm install
      - name: Build
        run: npm run build --prod
      - name: Archive Production Artifact
        uses: actions/upload-artifact@master
          name: dist
          path: dist
    name: Deploy
    needs: build
    runs-on: ubuntu-latest
      - name: Checkout Repo
        uses: actions/checkout@master
      - name: Download Artifact
        uses: actions/download-artifact@master
          name: dist
      - name: Deploy to Firebase
        uses: w9jds/firebase-action@master
          args: deploy --only hosting
          FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

Hi @micharzu

First please confirm that there is a TestCI folder under your Artifacts

Based on your workflow, you are using actions/download-artifact@master , the lastest version of the action. There is no longer an extra directory that is created if the path input is not provided. Only the content of the artifacts will be downloaded to the current working directory. So there is not a dist/TestCI path, just TestCI .

You could use

- uses: actions/download-artifact@v2
    name: **dist** path: **dist**

There is the detail explanation of download artifacts action:

If this is not your case, could you please enable step debug logging of your workflow and check whether there is something wrong?