Newer
Older
# All available Hugo versions are listed here: https://gitlab.com/pages/hugo/container_registry
#image: registry.gitlab.com/pages/hugo:latest
# Locking to v0.62.2 for now - hit by bug, 0.63.2 not available yet with fix:
# https://github.com/gohugoio/hugo/issues/6805
stages:
- generate-html
- generate-pdf
test-html:
image: registry.gitlab.com/pages/hugo:0.62.2
stage: generate-html
- DEFAULT_BASEURL=${CI_PAGES_URL##http:} # don't force stuff on plain HTTP when publishing on HTTPS
- BASEURL=${BASEURL:-$DEFAULT_BASEURL} # set BASEURL in the CI variables to override it
- echo "Using base URL '$BASEURL'"
- hugo -b "${BASEURL}"
artifacts:
paths:
- public
.gen-pdf:
image: docker-registry.apertis.org/apertis/apertis-v2020-documentation-builder
stage: generate-pdf
- echo "Building PDFs on $(nproc) cores"
- find public -name "*.pdf-in" -print0 | xargs -0 -r -n1 -P "$(nproc)" scripts/create-pdf
needs:
- job: test-html
test-pdf:
extends: .gen-pdf
except:
- master
pages:
extends: .gen-pdf