mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2025-06-07 21:19:32 +00:00
ci(gitlab-ci): update deploy scripts and add .env.ci managed by dotenvx
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.xyz>
This commit is contained in:
parent
e954a7fa74
commit
cc340223f9
4 changed files with 45 additions and 26 deletions
29
bin/build.sh
29
bin/build.sh
|
@ -1,28 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
set -e
|
||||
|
||||
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"}
|
||||
TARGET_BUILD_CONFIG=${1:-"mkdocs.yml"}
|
||||
|
||||
if [[ ! -d "$TARGET_DIR" ]]; then
|
||||
mkdir "$TARGET_DIR" -pv
|
||||
fi
|
||||
|
||||
if [[ $SKIP_VENV_SETUP == "" ]] || [[ $CI == "" ]]; then
|
||||
pipenv install --ignore-pipfile --deploy --verbose
|
||||
pipenv run mkdocs build -d "$TARGET_DIR" -f ${TARGET_BUILD_CONFIG}
|
||||
else
|
||||
pip3 install -r requirements.txt --upgrade --user
|
||||
mkdocs build -d "$TARGET_DIR" -f ${TARGET_BUILD_CONFIG}
|
||||
fi
|
||||
|
||||
mkdir "$TARGET_DIR/api"
|
||||
git rev-parse HEAD > "$TARGET_DIR/api/commit"
|
||||
TARGET_DIR="${PWD}/public"
|
||||
pipenv run build
|
||||
cp "$TARGET_DIR/assets/images/favicon.png" "$TARGET_DIR/favicon.ico"
|
||||
cp markdown/.well-known "$TARGET_DIR/.well-known" -rv
|
||||
cp markdown/humans.txt "$TARGET_DIR/humans.txt" -v
|
||||
|
||||
set +xe
|
||||
cp markdown/.well-known markdown/humans.txt "$TARGET_DIR/" -rv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue