File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change 4040 file : docker/Dockerfile
4141 push : true
4242 tags : thelightway/ai-teacher-back:latest
43+
44+ - name : Render 배포 시작
45+ id : start-time
46+ run : echo "start_time=$(date -u +%s)" >> $GITHUB_OUTPUT
4347
44- - name : Render 배포
48+ - name : Render 배포 요청
4549 run : curl "${{ secrets.RENDER_DEPLOY_HOOK_URL }}"
50+
51+ - name : Render 배포 상태 확인
52+ run : |
53+ echo "🔍 Render 배포 상태 확인 중..."
54+ API_URL="https://api.render.com/v1/services/${{ secrets.RENDER_SVC_ID }}"
55+ TOKEN="${{ secrets.RENDER_TOKEN }}"
56+ START_TIME=${{ steps.start-time.outputs.start_time }}
57+
58+ for i in {1..60}; do
59+ RESPONSE=$(curl -s -H "Authorization: Bearer $TOKEN" "$API_URL")
60+ UPDATED_AT=$(echo "$RESPONSE" | jq -r '.updatedAt')
61+
62+ if [ "$UPDATED_AT" = "null" ]; then
63+ echo "API 응답 오류, 다시 시도 중..."
64+ else
65+ UPDATED_TIME=$(date -u -d "$UPDATED_AT" +%s)
66+
67+ if [ "$UPDATED_TIME" -gt "$START_TIME" ]; then
68+ echo "Render 배포 완료 (updatedAt: $UPDATED_AT)"
69+ exit 0
70+ fi
71+ fi
72+ sleep 5
73+ done
74+
75+ echo "배포 확인 불가"
76+ exit 1
You can’t perform that action at this time.
0 commit comments