SecretIndividual
SecretIndividual

Reputation: 2549

Gitlab CI saving artifacts

What I am expecting:

I am trying to generate documentation in my CI script. I want that documentation to be stored in my repository.

I could be understanding the use of artifacts wrong but should this not do the trick?

building_documentation:
  stage: buildDoc
  only:
    - develop
  script:
    - npm run arkit
    - npm run doc
  artifacts:
    paths:
      - $CI_PROJECT_DIR/docs

The stage runs and completes without any errors. This is the output from the console (docker): enter image description here

But after it runs, when I look in my repository there is still no docs folder there containing the documentation generated by npm run doc.

In case the information is needed:

Upvotes: 2

Views: 8075

Answers (1)

Nicolas Pepinster
Nicolas Pepinster

Reputation: 6269

Artifact feature upload job artifacts created by Gitlab runner to the Gitlab server. Then, you can are download them as a single archive using the GitLab UI or the GitLab API.

Artifacts are not pushing back to your repository using artifacts. If you want to do this, you need to git add/commit and push back in your repository adding git commands in your .gitlab-ci.yml

Upvotes: 3

Related Questions