0

我的项目有一个自定义域:https://first.second.com并且我在https://first.second.com/main-project/subproject-name下有一个存储库。我在GitLab Sphinx 示例之后的顶级目录中添加了 .gitlab-ci.yml :

image: python:3.7-alpine

pages:
  stage: deploy
  script:
  - pip install -U sphinx
  - pip install sphinx_rtd_theme
  - pip install recommonmark
  - mkdir public
  - sphinx-build -b html docs/source public
  - sphinx-build -b html . public
  artifacts:
    paths:
    - public

我的 conf.py 文件位于 docs/source 中,我能够在本地运行上述所有命令并生成 index.html。当我将代码推送到存储库并且作业通过时,将触发 CI/CD 作业。当我单击作业链接并检查工件时,一切看起来都很好。public/index.html 存在。但是,当我转到设置 --> 页面时,我得到以下自定义链接:

http://main-project.page.second.com/subproject-name(存储库链接是https://first.second.com/main-project/subproject-name)。页面链接产生 404 错误。我不确定发生了什么以及是否有任何方法可以解决它。是否可以在https://first.second.com/main-project/subproject-name/documentation/部署页面?或者 Sphinx + GitLab 页面是否使用无法配置的自定义域?

4

0 回答 0