这是.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
管道通过,即作业pages
和pages:deploy
正在通过。网站也正确构建:当我下载工件时,所有资源都位于public
目录中。
但是,当我查看generated website时,index.html正在加载,但不是所有资源(404代码)。
以下是仓库:https://gitlab.com/Cl00e9ment/kingdom-blazon-generator
答案 0 :(得分:0)
GitLab的页面仅支持静态网页,但不支持动态网页。这意味着您不能运行诸如node.js
之类的服务器,而只能生成HTML和其他静态文件。
您可以在此处了解更多信息: