Skip to content

Commit

Permalink
refactor: removed redundant curl request, debugging logs, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
huseKivrak committed Nov 5, 2024
1 parent fac4cfd commit 99a2498
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99a2498

Please sign in to comment.