~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

ci(gitlab-cicd): try running it under bash subshell

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

Changed files
+4 -4
bin
+4 -4
bin/deploykit-pages.sh
···
_branch_name_git=$(git rev-parse --abbrev-ref HEAD)
_commit_sha=$(git rev-parse HEAD)
_commit_sha_short=$(git rev-parse --short HEAD)
-
_command_prefix="npx wrangler pages publish $_root_directory_git/public --project-name $CF_PAGES_PROJECT_NAME --branch $_branch_name_git --commit-hash $_commit_sha"
+
_command_prefix="npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch ${_branch_name_git} --commit-hash ${_commit_sha}"
warn() {
echo "warning: $*"
···
if [[ $_branch_name_git == "main" ]]; then
DEPLOY_COMMAND="$_command_prefix --env production"
elif [[ $CI_PIPELINE_SOURCE == "merge_request" ]]; then
-
DEPLOY_COMMAND="$_command_prefix --env pr-#CI_MERGE_REQUEST_ID"
+
DEPLOY_COMMAND="$_command_prefix --env pr-$CI_MERGE_REQUEST_ID"
fi
if ! git diff-index --quiet HEAD -- && [[ $FF_DIRTY_DEPLOY != "true" ]]; then
···
fi
if [[ $FF_DIRTY_DEPLOY == "true" ]]; then
-
$DEPLOY_COMMAND --commit-dirty
+
bash $DEPLOY_COMMAND --commit-dirty
else
-
${DEPLOY_COMMAND:-"$_command_prefix"}
+
bash ${DEPLOY_COMMAND:-"$_command_prefix"}
fi
if [[ $_branch_name_git == "main" ]]; then