Gitlab页面CI / CD管道正在传递,但是结果页面未加载资源

时间:2020-01-25 19:38:59

标签: continuous-integration gitlab gitlab-ci

这是.gitlab-ci.yml文件:

pages:
  stage: deploy
  script:
  - apt-get update
  - apt-get install -y nodejs npm  # install NPM in order to build the website
  - npm install
  - npm run build                  # build the website
  - mv dist public                 # move the built website to the public directory
  artifacts:
    paths:
    - public
  only:
  - master

管道通过,即作业pagespages:deploy正在通过。网站也正确构建:当我下载工件时,所有资源都位于public目录中。

但是,当我查看generated website时,index.html正在加载,但不是所有资源(404代码)。

以下是仓库:https://gitlab.com/Cl00e9ment/kingdom-blazon-generator

1 个答案:

答案 0 :(得分:0)

GitLab的页面仅支持静态网页,但不支持动态网页。这意味着您不能运行诸如node.js之类的服务器,而只能生成HTML和其他静态文件。

您可以在此处了解更多信息:

https://docs.gitlab.com/ee/user/project/pages/#overview