I want to host static page generated with Sphinx on GitLab Pages. Built index.html
file is in:
project/docs/build/html
How .gitlab-ci.yml
should look like to deploy the page? I have something like that and it isn't working:
pages:
stage: deploy
script:
- echo 'Nothing to do...'
artifacts:
paths:
- docs/build/html
only:
- master
Best Answer
According to the documentation for .gitlab-ci.yml, the
pages
job has special rules it must follow:So the example
.gitlab-ci.yml
you gave would look something like this:And of course, if you don't want to move the
html
folder for whatever reason, you can copy it instead.For further reference, an example
sphinx
project for GitLab Pages was pushed around the time you originally posted this question.