Skip to content

Vercel Deployment - agents-docs (ready) #946

Vercel Deployment - agents-docs (ready)

Vercel Deployment - agents-docs (ready) #946

name: Deployment Health Check
on:
repository_dispatch:
types: [vercel.deployment.ready]
run-name: Vercel Deployment - ${{ github.event.client_payload.project.name }} (${{ github.event.client_payload.state.type }})
jobs:
health-check:
runs-on: ubuntu-latest
if: ${{ github.event.client_payload.project.name == 'agents-api' }}
permissions:
actions: read
statuses: write
steps:
- name: Debug deployment info
uses: vercel/repository-dispatch/actions/debug@v1
- name: Debug deployment values
run: |
echo "Project Name: ${{ github.event.client_payload.project.name }}"
echo "URL: ${{ github.event.client_payload.url }}"
echo "Environment: ${{ github.event.client_payload.environment }}"
- name: Wait for cold start
run: sleep 10
- name: Check /health endpoint (liveness)
run: |
echo "Checking health endpoint at ${{ github.event.client_payload.url }}/health"
curl -f -s -o /dev/null -w "%{http_code}" \
"${{ github.event.client_payload.url }}/health" \
--retry 3 --retry-delay 5
- name: Check /ready endpoint (readiness)
run: |
echo "Checking ready endpoint at ${{ github.event.client_payload.url }}/ready"
response=$(curl -f -s "${{ github.event.client_payload.url }}/ready" \
--retry 3 --retry-delay 5)
echo "Response: $response"
echo "$response" | jq -e '.status == "ok"'
- name: Set Commit Status for Vercel
if: always()
uses: vercel/repository-dispatch/actions/status@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
name: "Vercel - agents-api: Health Check"