From 52336661437ddbb2866427769f50c21af0a5c7ce Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Tue, 4 Feb 2025 11:07:04 -0800 Subject: [PATCH] Debug workflow --- .github/workflows/update-readthedocs.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-readthedocs.yml b/.github/workflows/update-readthedocs.yml index 480c9c080..0c954f8ba 100644 --- a/.github/workflows/update-readthedocs.yml +++ b/.github/workflows/update-readthedocs.yml @@ -15,7 +15,18 @@ jobs: steps: - name: Trigger ReadTheDocs build run: | - curl -X POST \ + if [ -z "{{ secrets.READTHEDOCS_TOKEN }}" ]; then + echo "READTHEDOCS_TOKEN is not set" + exit 1 + fi + + response=$(curl -X POST \ -H "Content-Type: application/json" \ -d '{"token": "{{ secrets.READTHEDOCS_TOKEN }}"}' \ - https://readthedocs.org/api/v2/webhook/llama-stack/289764/ + https://readthedocs.org/api/v2/webhook/llama-stack/289764/) + + echo $response + if [ $(echo $response | jq -r '.build_triggered') != 'true' ]; then + echo "Failed to trigger ReadTheDocs build" + exit 1 + fi