ci: fix sphinx-multiversion tag detection in CI
- add GIT_DEPTH: 0 to build-docs job for full clone - add explicit git fetch --tags to ensure all tags are available - add debug commands to troubleshoot tag/branch availability - add sphinx-multiversion --dump-metadata for version detection This should fix the issue where v3.0.0 tag was not being picked up by sphinx-multiversion in GitLab CI, even though it works locally.
This commit is contained in:
parent
d029eca690
commit
e003592430
1 changed files with 10 additions and 0 deletions
|
@ -47,14 +47,24 @@ secret_detection:
|
|||
build-docs:
|
||||
stage: build-docs
|
||||
image: python:3
|
||||
variables:
|
||||
GIT_DEPTH: 0 # Ensure full clone for sphinx-multiversion
|
||||
before_script:
|
||||
- python -m pip install --upgrade pip
|
||||
- pip install -r requirements.txt
|
||||
- pip install -r requirements-doc.txt
|
||||
- git fetch --unshallow || true # Ensure we have full git history for multiversion
|
||||
- git fetch origin --tags || true # Ensure all tags are fetched from origin
|
||||
- git config --global --add safe.directory $CI_PROJECT_DIR
|
||||
script:
|
||||
- echo "Current commit:" $CI_COMMIT_SHA
|
||||
- echo "Current tag:" $CI_COMMIT_TAG
|
||||
- echo "Current branch:" $CI_COMMIT_BRANCH
|
||||
- git tag -l
|
||||
- git branch -a
|
||||
- cd docs
|
||||
- echo "Sphinx-multiversion detected versions:"
|
||||
- sphinx-multiversion --dump-metadata source build/multiversion/html
|
||||
- make multiversion
|
||||
artifacts:
|
||||
paths:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue