After successfully completing the build of GitLab Pages

I am trying to host an opens.js presentation via gitlab pages. The repository can be found here: https://gitlab.com/JanGregor/demo-slides

Mine is .gitlab-ci.yml

pretty simple:

image: node:4.2.2

pages:
  cache:
    paths:
    - node_modules/
  script:
  - npm install
  - node_modules/.bin/gulp
  artifacts:
    paths:
    - build
  only:
  - master

      

After committing to cope, something went wrong. The page task itself is complete and works just fine . It even shows in the logs that my build directory was scanned and that artifacts were found.

Oddly enough, the subsequent task pages:deploy

fails. He only says:

pages could not be retrieved

Any help would be greatly appreciated as I have no idea where to look next. The documentation itself is not very helpful when trying to implement a deployment flow with npm.

Thanks in advance!

+3


source to share


2 answers


Apparently, the page can only be published from the folder under the artifacts, which is called "public".



+3


source


From GitLab Pages Documentation :

To use GitLab pages, content .gitlab-ci.yml

must comply with the following rules:

  • There must be a special assignment named pages

  • Any static content that will be served by GitLab pages should be placed in the directory public/

  • artifacts

    with the path to the directory public/



Also mentioned (somewhat tentatively ) in the "GitLab Pages from A to Z" guide :

... and GitLab Pages will only look at files in a directory named public

.

+2


source







All Articles