Skip to content

Commit

Permalink
ignore epub from website-sphinx-app-docs
Browse files Browse the repository at this point in the history
Reason: Because right now it fails and only html is working. Once issue sphinx-doc/sphinx#13177 is fixed, it can be reverted
  • Loading branch information
Murmele committed Dec 11, 2024
1 parent af2f371 commit 79ffda4
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,64 @@
include:
- project: sysadmin/ci-utilities
file:
- /gitlab-templates/website-sphinx-app-docs.yml
- /gitlab-templates/blocks/workflow.yml
variables:
EPUB_NAME: LabplotManual
DOC_ROOT: source/
WEBSITE_LANGUAGES: ca cs de es fi fr it lt nl pt_PT sk uk_UA zh_CH

# Replace build_sphinx_app_docs by the kde template once
# https://github.com/sphinx-doc/sphinx/issues/13177 is fixed
# Commit of MR https://invent.kde.org/documentation/docs-labplot-org/-/merge_requests/4 can be reverted
# /gitlab-templates/website-sphinx-app-docs.yml
build_sphinx_app_docs:
image: invent-registry.kde.org/sysadmin/ci-images/staticweb:latest
tags:
- Linux
stage: build
variables:
GIT_DEPTH: "3"
before_script:
- git clone https://invent.kde.org/sysadmin/ci-utilities.git
- git clone https://invent.kde.org/sysadmin/ci-notary-service.git
script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- |
langList=$WEBSITE_LANGUAGES
if [ $CI_COMMIT_REF_PROTECTED != "true" ]; then
langList=en
fi
- |
for langToBuild in $langList; do
# build html
sphinx-build -M html "$DOC_ROOT" _staging/$langToBuild -D language="$langToBuild" -w _logs/warnings-$langToBuild-html.log -j auto
mkdir -p public/$langToBuild/
mv _staging/$langToBuild/html/* public/$langToBuild/
# build epub
#sphinx-build -M epub "$DOC_ROOT" _staging/$langToBuild -D language="$langToBuild" -w _logs/warnings-$langToBuild-epub.log -j auto
#mkdir public/$langToBuild/epub/
#mv _staging/$langToBuild/epub/*.epub public/$langToBuild/epub/
done
# turn duplicated files like image for each language into symlinks to reduce file size
- rdfind -makesymlinks true -makeresultsfile true $CI_PROJECT_DIR/public/
- mv results.txt _logs/rdfind-log.txt
# make symlinks relative (rdfind creates absolute symlinks)
- symlinks -cr $CI_PROJECT_DIR/public/ | tee _logs/symlinks-log.txt
# Publish
- python3 -u ci-notary-service/publishwebsite.py --config ci-utilities/signing/publishwebsite.ini public/
# Cleanup ebup files for artifacts capturing as they are too big
- rm -f public/*/epub/*.epub
artifacts:
expire_in: 2 weeks
when: always
paths:
- _logs/
- public/
- task*.log
exclude:
- public/**/*.epub # Do not capture the epubs, they are too big in most cases


run_tests:
stage: test
image: invent-registry.kde.org/sysadmin/ci-images/staticweb:latest
Expand Down

0 comments on commit 79ffda4

Please sign in to comment.