Skip to content

goddammit

goddammit #11

name: Frontend CI
on:
push:
branches: [master]
paths:
- 'apps/frontend/**'
- 'packages/shared/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Trigger Vercel Deploy
env:
HOOK_URL: ${{ secrets.VERCEL_DEPLOY_HOOK }}
run: |
HOOK_URL=$(echo "$HOOK_URL" | tr -d '[:space:]')
echo "URL length: ${#HOOK_URL}"
response=$(curl -s -w "\n%{http_code}" -X POST \
-H "Content-Type: application/json" \
-d '{}' \
"$HOOK_URL")
http_code=$(echo "$response" | tail -n1)
body=$(echo "$response" | sed '$d')
echo "Response: $body"
echo "HTTP Code: $http_code"
if [ "$http_code" -ne 200 ] && [ "$http_code" -ne 201 ]; then
echo "::error::Deploy hook failed with status $http_code"
exit 1
fi
echo "Deploy triggered"