mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2025-06-07 13:09:32 +00:00
chore(global): get cooked on scripts and lockfiles
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.dev>
This commit is contained in:
parent
a923dd341c
commit
9bbdbf2a2e
9 changed files with 189 additions and 14 deletions
|
@ -5,6 +5,9 @@ if [[ $DEBUG != "" ]]; then
|
|||
fi
|
||||
|
||||
_root_directory_git=$(git rev-parse --show-toplevel)
|
||||
_git_current_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH:-$_git_current_branch}
|
||||
CI_DEFAULT_BRANCH="main"
|
||||
|
||||
warn() {
|
||||
echo "warning: $*"
|
||||
|
@ -18,7 +21,9 @@ 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:-"ajhalili2006"} --branch main
|
||||
scp -i "$PWD/.secretskit/passwordless" -o "StrictHostKeyChecking=no" -rv public ajhalili@iapetus.uberspace.de:html
|
||||
if [[ $CI == "true" ]]; then
|
||||
info "Deploying to Cloudflare Pages"
|
||||
if [[ $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:-"ajhalili2006"} --branch main
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue