From 99a24987e596df19e0d10934055eaa0dc534ec3b Mon Sep 17 00:00:00 2001 From: Huse Kivrak Date: Tue, 5 Nov 2024 14:46:43 -0500 Subject: [PATCH] refactor: removed redundant curl request, debugging logs, etc. --- .github/workflows/cron.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 933420b..5f8af73 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -14,15 +14,13 @@ jobs: CRON_ACTION_SECRET: ${{ secrets.CRON_ACTION_SECRET }} ELEVENLABS_API_KEY: ${{ secrets.ELEVENLABS_API_KEY }} run: | - RESPONSE=$(curl -s -L -H "Authorization: Bearer $CRON_ACTION_SECRET" \ + RESPONSE=$(curl -s -L -w "%{http_code}" -H "Authorization: Bearer $CRON_ACTION_SECRET" \ -X GET "https://www.npspeak.com/api/cron") + STATUS_CODE=${RESPONSE: -3} + BODY=${RESPONSE::-3} - echo "Response body: $RESPONSE" - - STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" -L -H "Authorization: Bearer $CRON_ACTION_SECRET" \ - -X GET "https://www.npspeak.com/api/cron") - + echo "Response body: $BODY" if [ "$STATUS_CODE" -ne 200 ]; then echo "Sync Voices failed with status code $STATUS_CODE" exit 1