2024-10-12 19:10:03 +00:00
|
|
|
#!/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: $*"
|
|
|
|
}
|
|
|
|
|
2024-10-12 19:37:10 +00:00
|
|
|
if [[ $CI == "true" ]] && [[ $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web" ]] && [[ $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ]]; then
|
2024-10-12 19:10:03 +00:00
|
|
|
npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch main
|
2024-10-13 03:15:13 +00:00
|
|
|
scp -rv public ajhalili@iapetus.uberspace.de:html
|
2024-10-12 19:10:03 +00:00
|
|
|
fi
|