upload-pages-artifact finds no files at the path you gave it
No files were found with the provided pathShort 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.
Fix it fast
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"2Match what you see, then jump to its 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/*.yml2Fix
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
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 _site2Fix
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: true3Verify
The deployed site serves the hidden path.
curl -I https://example.com/.well-known/security.txtConfirmed by github.com
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
upload-artifact fails because the artifact storage quota is full
Create Artifact Container failed: Artifact storage quota has been hit. Unable to upload any new artifacts
Uploads fail when your account's shared artifact storage is used up.
3 causes, each with a fixServers
Docker push to Artifact Registry fails from GitHub Actions with a permission error
Permission 'artifactregistry.repositories.uploadArtifacts' denied on resource
The identity your workflow authenticates as lacks the permission artifactregistry.repositories.uploadArtifacts on the target repository.
4 causes, each with a fixServers
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 fixServers
git says it could not read Username for https://github.com in a build or CI job
fatal: could not read Username for 'https://github.com': No such device or address
Git asked for HTTPS credentials and there was no terminal to ask on, so it gave up.
3 causes, each with a fixServers
configure-aws-credentials says no OpenID Connect provider exists for GitHub
No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com
AWS has no IAM identity provider for GitHub's token issuer in the account that holds the role.
3 causes, each with a fixServers
A local composite action in GitHub Actions cannot be found
The action folder is in the repository but the runner reports that its action.yml cannot be found
A local action is read from the checked-out repository.
3 causes, each with a fix