Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

upload-pages-artifact finds no files at the path you gave it

ErrorNo files were found with the provided path

Short answer

upload-pages-artifact packs the folder in its path input, which defaults to _site/. If your build writes somewhere else, the folder is empty, or the files sit in a dot-folder, the upload finds nothing. Print the folder after the build, set path to the real output, and set include-hidden-files only when you need dotfiles.

  • Applies to GitHub Actions, actions/upload-pages-artifact v3/v4
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Add a step right before the upload that lists the folder you expect. If the listing is empty or missing, the problem is the build, not the upload.

    - run: ls -la _site || echo "no _site folder"
  2. 2Match what you see, then jump to its fix

    1. 1The listing shows files under dist/, build/ or out/, not _site/The build writes to a different folder than the path inputFix
    2. 2Only files such as .well-known/ or .nojekyll are missing, or the whole output sits in a dot-folderThe files are hidden (dot-files or dot-folders)Fix

What does the error look like?

  • No files were found with the provided path

Cause 1 of 2

The build writes to a different folder than the path input

1Check

The path input is required and defaults to _site/. Check your tool's output directory (dist, build, out, public) against it.

grep -n -B2 -A4 'upload-pages-artifact' .github/workflows/*.yml

2Fix

Set path to the real output folder.

- uses: actions/upload-pages-artifact@v4
  with:
    path: dist/

3Verify

The upload step ends without the warning and the artifact github-pages appears on the run.

gh run view --log | grep -i -E 'artifact|files were found'

Confirmed by github.com

Did this fix it?

Cause 2 of 2

The files are hidden (dot-files or dot-folders)

1Check

include-hidden-files defaults to false, so hidden files and directories are skipped. .git and .github are always excluded.

ls -la _site

2Fix

Set include-hidden-files: true if the site really needs a hidden path, such as .well-known. If the whole output sits in a dot-folder, move it out instead.

- uses: actions/upload-pages-artifact@v4
  with:
    path: _site/
    include-hidden-files: true

3Verify

The deployed site serves the hidden path.

curl -I https://example.com/.well-known/security.txt

Confirmed by github.com

Did this fix it?

How do I stop it coming back?

  • Set path explicitly instead of relying on the _site/ default.
  • List the output folder in a step before the upload.
  • Keep the artifact under the 1 GB the Pages docs recommend.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Servers

docker pull or push to ghcr.io fails with 'denied'

Error response from daemon: denied

ghcr.io refuses a pull or push when Docker is not logged in, when the token lacks the package scope, or when the workflow's GITHUB_TOKEN has no packages permission or no access to that package.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.