GitHub Actions · artifacts

When upload-artifact finds no files.

The upload step is usually reporting a symptom: the producer wrote somewhere else, never ran, or produced nothing. Prove which one happened before changing the upload policy.

Warning: No files were found with the provided path: apps/web/dist.
No artifacts will be uploaded.

Short version: verify the producing step succeeded, print the expected output path, make the artifact path relative to the checked-out workspace, and use if-no-files-found: error when that output is required.

Why a successful build can still miss the path.

Run-step directory

A build command with working-directory: apps/web may create apps/web/dist relative to the repository workspace.

Action input path

The later uses: actions/upload-artifact step does not inherit that run-step directory. Give it the actual workspace-relative output path.

A job that proves the handoff.

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - name: Build the web package
        run: npm ci && npm run build
        working-directory: apps/web

      - name: Prove an upload-eligible file exists
        shell: bash
        run: |
          set -euo pipefail
          first_file="$(find apps/web/dist -type f ! -path '*/.*' -print -quit)"
          if [ -z "$first_file" ]; then
            echo "No non-hidden build file exists under apps/web/dist" >&2
            exit 1
          fi
          find apps/web/dist -type f ! -path '*/.*' -print

      - name: Upload the web build
        uses: actions/upload-artifact@v7
        with:
          name: web-dist
          path: apps/web/dist/
          if-no-files-found: error

This Ubuntu example fails at the first missing boundary, requires at least one non-hidden regular file, and shows the files that will be handed off. That matches the action's default exclusion of hidden files. The upload path is explicit, repository-relative, and independent of the build command's working directory.

Check these in order.

  1. Open the producing step, not only the upload step. Confirm it ran, was not skipped by an if condition, and exited successfully.
  2. Find the command's actual current directory and output setting. A framework may write to build, dist, target, or a configured custom directory.
  3. Check case exactly. Linux runners distinguish Dist from dist.
  4. Add a temporary, bounded listing of the expected directory. Avoid dumping the entire workspace or environment into public logs.
  5. Use if-no-files-found: error for required deliverables. Keep the default warning only when an empty result is genuinely acceptable.

Three tempting non-fixes.

Boundary: a successful upload proves matching files were packaged. It does not prove the artifact is complete, executable after extraction, safe to publish, or valid for a later deployment.

Primary references.

Diagnose before you buy.

Run the free offline CI Rescue Action against one workflow and an optional sanitized log. If the report still leaves the hosted failure unresolved, request a focused diagnosis, reviewable patch, and verification report for one failing job path.

Run the free diagnostic → Request a $49 rescue →