feat(cli): add site cli to run scripts + handle media

This commit is contained in:
Cory Dransfeldt 2025-06-05 18:48:20 -07:00
parent 5055816f68
commit d08787f5aa
No known key found for this signature in database
12 changed files with 1615 additions and 26 deletions

View file

@ -63,6 +63,29 @@ echo "${COLOR_BLUE}Writing .env file...${COLOR_RESET}"
echo "$SECRETS" | jq -r 'to_entries | .[] | "\(.key)=\(.value)"' > .env
export $(grep -v '^#' .env | xargs)
echo "${COLOR_BLUE}📦 Installing root project dependencies...${COLOR_RESET}"
npm install
echo "${COLOR_BLUE}📦 Installing PHP dependencies (composer)...${COLOR_RESET}"
composer install
echo "${COLOR_BLUE}📦 Installing CLI dependencies...${COLOR_RESET}"
(
cd cli
npm install
)
if ! command -v cd_cli >/dev/null 2>&1; then
echo "${COLOR_BLUE}🔗 Linking CLI globally...${COLOR_RESET}"
(
cd cli
npm link
)
fi
echo "${COLOR_BLUE}⚙️ Initializing media storage config...${COLOR_RESET}"
cd_cli init
mkdir -p generated
# escape sed replacements