2022-12-14 03:36:53 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -xe
|
|
|
|
|
2023-03-27 15:29:38 +00:00
|
|
|
TARGET_DIR=${TARGET_DIR:-"$PWD/public"}
|
2023-02-18 17:50:05 +00:00
|
|
|
FF_OFFLINE_MKDOCS_PLUGIN=${FF_OFFLINE_MKDOCS_PLUGIN:-"false"}
|
2023-03-27 15:29:38 +00:00
|
|
|
FF_ENABLE_COMMIT_DATA=${FF_ENABLE_COMMIT_DATA:-"true"}
|
|
|
|
FF_GENERATE_SOCIAL_CARDS=${FF_GENERATE_SOCIAL_CARDS:-"true"}
|
2022-12-14 03:36:53 +00:00
|
|
|
|
2023-07-14 16:59:47 +00:00
|
|
|
if [[ ! -d "$PWD/.venv" && $SKIP_VENV_SETUP == "" ]]; then
|
2023-03-27 15:29:38 +00:00
|
|
|
python3 -m venv $PWD/.venv
|
|
|
|
fi
|
|
|
|
$PWD/.venv/bin/pip3 install -r requirements.txt --upgrade
|
|
|
|
$PWD/.venv/bin/mkdocs build -d $TARGET_DIR
|
2023-07-12 16:30:36 +00:00
|
|
|
mkdir "$TARGET_DIR/api"
|
|
|
|
git rev-parse HEAD > "$TARGET_DIR/api/commit"
|
2022-12-14 03:36:53 +00:00
|
|
|
|
|
|
|
set +xe
|