I have been stuck with a problem for several days without solutions. I am trying to deploy local docs generated with Sphinx to Gitlab pages.
Below is my .gitlab-ci.yml on the root directory of the repos, and I am using the latest Ubuntu image:
stage: deploy
script:
- apt update
- apt install -y python3-pip
- rm -rf /var/lib/apt/lists/*
- pip install -U sphinx
- pip install sphinx-autobuild
- pip install sphinx-autoapi
- pip install furo
- sphinx-build -b html -E -a ./docs/ public
artifacts:
paths:
- public
only:
- master
I have used the tags -E and -a during sphinx-build to force rebuild of all HTML pages, but the updated changes from the docstrings are still not picked up by Sphinx.
I am using sphinx-autoapi, and I have tried to point the autoapi_dirs to the correct directory:
autoapi_dirs = ['../mypackage']
autoapi_type = "python"
autoapi_options = [
"members",
"special-members",
"undoc-members",
"show-inheritance",
"show-module-summary",
"imported-members"
]
For my local build, the documentation can be updated accordingly, but for the deployment on Gitlab pages, each deployed version still sticks to the old documentation. I am not sure what else I can do to resolve this problem? Did I miss anything during the deployment?
Thank you for any suggestions :)