~ajhalili2006's personal website, built with Zensical (successor of Material for Mkdocs) [old repo name got bugged while attempting to do manual knot migration via repo deletion] andreijiroh.dev
zensical mkdocs-material website

Only export dotenv file if its exist

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>

Changed files
+3 -1
bin
+3 -1
bin/deploykit-pages.sh
···
## source vars from .env first ##
_root_directory_git=$(git rev-parse --show-toplevel)
# shellcheck file=/dev/null
-
source "$_root_directory_git/.env"
_branch_name_git=$(git rev-parse --abbrev-ref HEAD)
_commit_sha=$(git rev-parse HEAD)
···
## source vars from .env first ##
_root_directory_git=$(git rev-parse --show-toplevel)
# shellcheck file=/dev/null
+
if [[ -f "$_root_directory_git/.env" ]]; then
+
source "$_root_directory_git/.env"
+
fi
_branch_name_git=$(git rev-parse --abbrev-ref HEAD)
_commit_sha=$(git rev-parse HEAD)