mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2024-11-22 00:13:40 +00:00
ci(deploykit-pages): fix more outstanding issues
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
This commit is contained in:
parent
41bafbec90
commit
fca7c26b17
1 changed files with 4 additions and 3 deletions
|
@ -28,9 +28,9 @@ info() {
|
|||
}
|
||||
|
||||
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"
|
||||
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
|
||||
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"
|
||||
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
|
||||
|
@ -45,11 +45,12 @@ if [[ ! -d "$_root_directory_git/public" ]]; then
|
|||
fi
|
||||
|
||||
if [[ $FF_DIRTY_DEPLOY == "true" ]]; then
|
||||
$DEPLOY_COMMAND --commit-dirty
|
||||
$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
|
||||
|
|
Loading…
Reference in a new issue