mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2025-06-07 13:09:32 +00:00
ci(gitlab-ci): update deploy scripts and add .env.ci managed by dotenvx
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.xyz>
This commit is contained in:
parent
e954a7fa74
commit
cc340223f9
4 changed files with 45 additions and 26 deletions
24
bin/deploy.sh
Executable file
24
bin/deploy.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/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
|
Loading…
Add table
Add a link
Reference in a new issue