File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,19 +272,24 @@ jobs:
272272 if : ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
273273 env :
274274 PREVIEW_URL : https://nvidia.github.io/cuda-python/pr-preview/pr-${{ env.PR_NUMBER }}
275+ EXPECTED_SHA : ${{ github.sha }}
275276 run : |
277+ preview_ready=0
276278 marker_url="${PREVIEW_URL}/.preview-commit"
277279 for attempt in {1..60}; do
278280 marker=$(curl -fsSL "${marker_url}" || true)
279- if [[ "${marker}" == "${{ github.sha } }" ]]; then
280- echo "Doc preview is available at ${PREVIEW_URL}"
281- exit 0
281+ if [[ "${marker}" == "${EXPECTED_SHA }" ]]; then
282+ preview_ready=1
283+ break
282284 fi
283285 echo "Waiting for doc preview marker ${marker_url} (${attempt}/60)"
284286 sleep 10
285287 done
286- echo "error: doc preview marker did not update to ${{ github.sha }}" >&2
287- exit 1
288+ if [[ "${preview_ready}" != "1" ]]; then
289+ echo "error: doc preview marker did not update to ${EXPECTED_SHA}" >&2
290+ exit 1
291+ fi
292+ echo "Doc preview is available at ${PREVIEW_URL}"
288293
289294 - name : Restore lychee cache
290295 id : restore-lychee-cache
You can’t perform that action at this time.
0 commit comments