website/bin/build.sh
Andrei Jiroh Halili 6101e45636
ci(gitlab-ci): use pip3 install on CI instead of pipenv
Also updated the hashes on requirements.txt file

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.eu.org>
2023-10-05 10:25:12 +08:00

21 lines
620 B
Bash
Executable file

#!/usr/bin/env bash
set -xe
TARGET_DIR=${TARGET_DIR:-"$PWD/public"}
FF_OFFLINE_MKDOCS_PLUGIN=${FF_OFFLINE_MKDOCS_PLUGIN:-"false"}
FF_ENABLE_COMMIT_DATA=${FF_ENABLE_COMMIT_DATA:-"true"}
FF_GENERATE_SOCIAL_CARDS=${FF_GENERATE_SOCIAL_CARDS:-"true"}
if [[ $SKIP_VENV_SETUP == "" ]] || [[ $CI == "" ; then
pipenv install -r requirements.txt
pipenv run -- mkdocs build -d "$TARGET_DIR"
else
pip3 install -r requirements.txt --upgrade
mkdocs build -d "$TARGET_DIR"
fi
mkdir "$TARGET_DIR/api"
git rev-parse HEAD > "$TARGET_DIR/api/commit"
cp "$TARGET_DIR/assets/images/favicon.png" "$TARGET_DIR/favicon.ico"
set +xe