~ajhalili2006's personal website, built with Zensical (successor of Material for Mkdocs) [old repo name got bugged while attempting to do manual knot migration via repo deletion] andreijiroh.dev
zensical mkdocs-material website
1#!/usr/bin/env bash 2set -ea 3if [[ $DEBUG != "" ]]; then 4 set -x 5fi 6 7_root_directory_git=$(git rev-parse --show-toplevel) 8_git_current_branch=$(git rev-parse --abbrev-ref HEAD) 9CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH:-$_git_current_branch} 10CI_DEFAULT_BRANCH="main" 11 12warn() { 13 echo "warning: $*" 14} 15 16error() { 17 echo "error: $*" 18} 19 20info() { 21 echo "info: $*" 22} 23 24if [[ $CI == "true" ]]; then 25 info "Deploying to Cloudflare Pages" 26 if [[ $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web" ]] && [[ $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ]]; then 27 npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME:-"ajhalili2006"} --branch main 28 fi 29fi