mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2024-11-25 18:03:44 +00:00
ci(global): syntax fixes on scripts + repo URL update on config
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
This commit is contained in:
parent
79659f3ebd
commit
41bafbec90
3 changed files with 6 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/env
|
#!/bin/env bash
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
SOURCEHUT_USERNAME=${SOURCEHUT_PAGES_SUBDOMAIN:-"ajhalili2006"}
|
SOURCEHUT_USERNAME=${SOURCEHUT_PAGES_SUBDOMAIN:-"ajhalili2006"}
|
||||||
|
|
|
@ -27,7 +27,7 @@ info() {
|
||||||
echo "info: $*"
|
echo "info: $*"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $_branch_name_git == "main" ]]; then
|
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"
|
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"
|
||||||
elif [[ $CI_PIPELINE_SOURCE == "merge_request" ]]; then
|
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"
|
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"
|
||||||
|
@ -47,10 +47,11 @@ fi
|
||||||
if [[ $FF_DIRTY_DEPLOY == "true" ]]; then
|
if [[ $FF_DIRTY_DEPLOY == "true" ]]; then
|
||||||
$DEPLOY_COMMAND --commit-dirty
|
$DEPLOY_COMMAND --commit-dirty
|
||||||
else
|
else
|
||||||
${DEPLOY_COMMAND}
|
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
|
fi
|
||||||
|
|
||||||
if [[ $_branch_name_git == "main" ]]; then
|
if [[ $_branch_name_git == "main" ]] || [[ $_branch_name_git == "HEAD" ]]; then
|
||||||
tar -C public -cvz . -f site-build.tar.gz
|
tar -C public -cvz . -f site-build.tar.gz
|
||||||
curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
||||||
-Fcontent=@site-build.tar.gz \
|
-Fcontent=@site-build.tar.gz \
|
||||||
|
|
|
@ -13,7 +13,7 @@ docs_dir: markdown
|
||||||
use_directory_urls: true
|
use_directory_urls: true
|
||||||
|
|
||||||
# repos
|
# repos
|
||||||
repo_url: https://mau.dev/ajhalili2006/tildeverse-web
|
repo_url: https://mau.dev/andreijiroh.dev/website
|
||||||
edit_uri: edit/main/markdown
|
edit_uri: edit/main/markdown
|
||||||
repo_name: source code
|
repo_name: source code
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue