diff --git a/lektor.yml b/lektor.yml index 3a1ec63c553ce3bf51c8662f4e4cb8ade7e78995..de0580a11d2b59eaabd753b791b80e93258b9f76 100644 --- a/lektor.yml +++ b/lektor.yml @@ -37,18 +37,24 @@ pages: stage: build script: - *apt-template - - DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl python3-cryptography python3-venv i18nspector apt-utils ca-certificates -y + - DEBIAN_FRONTEND=noninteractive apt-get install python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl python3-cryptography python3-venv apt-utils ca-certificates -y - python3 -m venv venv - source venv/bin/activate - pip3 install lektor - - echo 'checking out translations' - - rm -rf i18n - - git clone --branch $TRANSLATION_BRANCH --depth=1 https://git.torproject.org/translation.git i18n - - echo 'reinstall lektor plugins' - - lektor project-info --output-path - - lektor plugins reinstall - - echo 'building lektor 3 more times to get translations in place' - - lektor build --output-path public && lektor build --output-path public && lektor build --output-path public + - > + if [ -n "${TRANSLATION_BRANCH}" ]; then + DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel i18nspector + echo 'checking out translations' + rm -rf i18n + git clone --branch "${TRANSLATION_BRANCH}" --depth=1 https://git.torproject.org/translation.git i18n + echo 'reinstall lektor plugins' + lektor project-info --output-path + lektor plugins reinstall + echo 'building lektor 3 more times to get translations in place' + lektor build --output-path public && lektor build --output-path public && lektor build --output-path public + else + lektor build --output-path public + fi artifacts: paths: - public