~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(deploykit-pages): fix more outstanding issues

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

Changed files
+4 -3
bin
+4 -3
bin/deploykit-pages.sh
···
}
if [[ $_branch_name_git == "main" ]] || [[ $_branch_name_git == "HEAD" ]]; then
-
DEPLOY_COMMAND="npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch ${_branch_name_git} --commit-hash ${_commit_sha} --env production"
elif [[ $CI_PIPELINE_SOURCE == "merge_request" ]]; then
-
DEPLOY_COMMAND="npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch ${_branch_name_git} --commit-hash ${_commit_sha} --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
else
DEFAULT_COMMAND="npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch main --env production"
${DEPLOY_COMMAND:-$DEFAULT_COMMAND}
fi
if [[ $_branch_name_git == "main" ]] || [[ $_branch_name_git == "HEAD" ]]; then
tar -C public -cvz . -f site-build.tar.gz
···
}
if [[ $_branch_name_git == "main" ]] || [[ $_branch_name_git == "HEAD" ]]; then
+
export DEPLOY_COMMAND="npx wrangler pages deploy ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch main --commit-hash ${_commit_sha} --env production"
elif [[ $CI_PIPELINE_SOURCE == "merge_request" ]]; then
+
export DEPLOY_COMMAND="npx wrangler pages deploy ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch ${_branch_name_git} --commit-hash ${_commit_sha} --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=true
else
DEFAULT_COMMAND="npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch main --env production"
${DEPLOY_COMMAND:-$DEFAULT_COMMAND}
fi
+
unset DEPLOY_COMMAND
if [[ $_branch_name_git == "main" ]] || [[ $_branch_name_git == "HEAD" ]]; then
tar -C public -cvz . -f site-build.tar.gz