parlo-styring-skill/scripts/deploy.sh

40 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
# Parlo Styring deployment helper
REPO_URL="http://git.machinemachine.ai/machine.machine/parlo-styring.git"
APP_URL="https://parlo.machinemachine.ai"
FORGEJO_TOKEN="${FORGEJO_TOKEN:-853477e0b57dea951c8c46c6c24b0ddffa5393dc}"
case "$1" in
status)
echo "Checking app health..."
curl -s "$APP_URL/api/health" 2>/dev/null || echo "App not responding"
;;
commits)
echo "Recent commits:"
curl -s -H "Authorization: token $FORGEJO_TOKEN" \
"http://git.machinemachine.ai/api/v1/repos/machine.machine/parlo-styring/commits?limit=${2:-5}" \
| jq -r '.[] | "\(.sha[0:7]) \(.commit.message | split("\n")[0]) - \(.commit.author.name)"'
;;
clone)
echo "Cloning parlo-styring..."
git clone "$REPO_URL" "${2:-parlo-styring}"
;;
push)
echo "Pushing changes (triggers Coolify deploy)..."
git push origin main
;;
*)
echo "Usage: $0 {status|commits|clone|push}"
echo ""
echo "Commands:"
echo " status Check app health"
echo " commits [n] Show recent n commits (default 5)"
echo " clone [dir] Clone repo to directory"
echo " push Push changes to trigger deploy"
;;
esac