website/bin/deploy.sh
Andrei Jiroh Halili 84f090d0ec
docs(global): update content and broken scripts
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.xyz>
2024-10-12 19:37:10 +00:00

23 lines
No EOL
486 B
Bash
Executable file

#!/usr/bin/env bash
set -ea
if [[ $DEBUG != "" ]]; then
set -x
fi
_root_directory_git=$(git rev-parse --show-toplevel)
warn() {
echo "warning: $*"
}
error() {
echo "error: $*"
}
info() {
echo "info: $*"
}
if [[ $CI == "true" ]] && [[ $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web" ]] && [[ $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ]]; then
npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch main
fi