Fail at uploading artifact

Summary

I have a project (https://gitlab.com/alexmascension/scallop/tree/release-1.0) in which I configured the .gitlab-ci.yml file to run a test, and upload the documentation produced by Sphinx. I followed the example .gitlab-ci.yml files, and the runner can compile the docs and copy them to public, but cannot add them to artifacts.

Steps to reproduce

The test should be reproducible by copying the docs folder alongside with yaml file. All reports can be seen in the CI/CD pipeline.

What is the current bug behavior?

When running CI/CD on the current .gitlab-ci.yml with the following pages section

pages:
  stage: build
  script:
  - pip install sphinx m2r sphinxcontrib-napoleon sphinx_rtd_theme
  - cd docs
  - make html
  - cp -r build/html/ public/

  artifacts:
    paths:
    - public

The runner reports this error

The HTML pages are in build/html.
$ cp -r build/html/ public/
Uploading artifacts...
WARNING: public: no matching files                 
ERROR: No files to upload                          
Job succeeded

I asserted that public was not empty with a ls in a previous commit.

$ cp -r build/html public
$ ls build/html
_images
_sources
_static
genindex.html
index.html
modules.html
objects.inv
personal-rst
search.html
searchindex.js
$ ls public
_images
_sources
_static
genindex.html
index.html
modules.html
objects.inv
personal-rst
search.html
searchindex.js
Uploading artifacts...
WARNING: public: no matching files                 
ERROR: No files to upload                          
Job succeeded

Interestingly, the runner exits with a success.

What is the expected correct behavior?

The runner should deploy the web correctly and https://alexmascension.gitlab.io/scallop/ should show the documentation

Assignee Loading
Time tracking Loading