@@ -253,55 +253,7 @@ jobs:
253253 run : |
254254 echo "${{ github.sha }}" > artifacts/docs/.preview-commit
255255
256- # TODO: Consider removing this step?
257- - name : Upload doc artifacts
258- uses : actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
259- with :
260- path : artifacts/
261- retention-days : 3
262-
263- - name : Deploy or clean up doc preview
264- if : ${{ !inputs.is-release }}
265- uses : ./.github/actions/doc_preview
266- with :
267- source-folder : ${{ (github.ref_name != 'main' && 'artifacts/docs') ||
268- ' artifacts/empty_docs' }}
269- pr-number : ${{ env.PR_NUMBER }}
270-
271- - name : Wait for doc preview deployment
272- if : ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
273- env :
274- PREVIEW_URL : https://nvidia.github.io/cuda-python/pr-preview/pr-${{ env.PR_NUMBER }}
275- EXPECTED_SHA : ${{ github.sha }}
276- run : |
277- preview_ready=0
278- marker_url="${PREVIEW_URL}/.preview-commit"
279- for attempt in {1..60}; do
280- marker=$(curl -fsSL "${marker_url}" || true)
281- if [[ "${marker}" == "${EXPECTED_SHA}" ]]; then
282- preview_ready=1
283- break
284- fi
285- echo "Waiting for doc preview marker ${marker_url} (${attempt}/60)"
286- sleep 10
287- done
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}"
293-
294- - name : Restore lychee cache
295- id : restore-lychee-cache
296- if : ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
297- uses : actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
298- with :
299- path : .lycheecache
300- key : docs-preview-lychee-${{ env.PR_NUMBER }}-${{ github.sha }}
301- restore-keys : |
302- docs-preview-lychee-${{ env.PR_NUMBER }}-
303-
304- - name : Write lychee doc preview URL list
256+ - name : Write doc preview link-check URL list
305257 if : ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
306258 env :
307259 PREVIEW_URL : https://nvidia.github.io/cuda-python/pr-preview/pr-${{ env.PR_NUMBER }}
@@ -315,36 +267,29 @@ jobs:
315267 fi
316268 wc -l lychee-preview-urls.txt
317269
318- - name : Check doc preview links
270+ - name : Upload doc preview link-check URL list
319271 if : ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
320- uses : lycheeverse/lychee-action@6da1d14f3a43098a294b7696d93d938aa8d20fc0 # unreleased: supports v0.24.x archive layout
272+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
273+ with :
274+ name : docs-preview-linkcheck-urls
275+ path : lychee-preview-urls.txt
276+ if-no-files-found : error
277+ retention-days : 3
278+
279+ # TODO: Consider removing this step?
280+ - name : Upload doc artifacts
281+ uses : actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
321282 with :
322- args : >-
323- --files-from ${{ github.workspace }}/lychee-preview-urls.txt
324- --include-fragments=full
325- --cache
326- --max-cache-age 1d
327- --max-concurrency 16
328- --host-concurrency 2
329- --host-request-interval 250ms
330- --max-retries 3
331- --retry-wait-time 5
332- --timeout 30
333- --no-progress
334- fail : true
335- failIfEmpty : true
336- format : markdown
337- jobSummary : false
338- lycheeVersion : v0.24.2
339- output : lychee-preview.md
340- token : ${{ github.token }}
341-
342- - name : Save lychee cache
343- if : ${{ always() && !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') && steps.restore-lychee-cache.outputs.cache-hit != 'true' && steps.restore-lychee-cache.outputs.cache-primary-key != '' }}
344- uses : actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
283+ path : artifacts/
284+ retention-days : 3
285+
286+ - name : Deploy or clean up doc preview
287+ if : ${{ !inputs.is-release }}
288+ uses : ./.github/actions/doc_preview
345289 with :
346- path : .lycheecache
347- key : ${{ steps.restore-lychee-cache.outputs.cache-primary-key }}
290+ source-folder : ${{ (github.ref_name != 'main' && 'artifacts/docs') ||
291+ ' artifacts/empty_docs' }}
292+ pr-number : ${{ env.PR_NUMBER }}
348293
349294 - name : Deploy doc update
350295 if : ${{ github.ref_name == 'main' || inputs.is-release }}
0 commit comments