Run-step directory
A build command with working-directory: apps/web may create apps/web/dist relative to the repository workspace.
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.
A build command with working-directory: apps/web may create apps/web/dist relative to the repository workspace.
The later uses: actions/upload-artifact step does not inherit that run-step directory. Give it the actual workspace-relative output path.
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.
if condition, and exited successfully.build, dist, target, or a configured custom directory.Dist from dist.if-no-files-found: error for required deliverables. Keep the default warning only when an empty result is genuinely acceptable.**/* globs. This can upload unrelated files and still leaves the producing path unexplained.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.
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 →