File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 6161 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6262 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6363 run : |
64+ set +e
6465 gh --version
65- gh api -X POST "repos/$GITHUB_REPOSITORY/pages/telemetry"
66- continue-on-error : true
66+ # Only attempt telemetry when the run exists and the endpoint is available.
67+ if gh api -X GET "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >/dev/null 2>&1; then
68+ gh api -X POST \
69+ -H "Accept: application/vnd.github+json" \
70+ -H "X-GitHub-Api-Version: 2022-11-28" \
71+ "repos/$GITHUB_REPOSITORY/pages/telemetry" \
72+ && echo "Telemetry reported" \
73+ || echo "::notice::Pages telemetry endpoint returned non-2xx; skipping (harmless)."
74+ else
75+ echo "::notice::Workflow run $GITHUB_RUN_ID not found for telemetry; skipping."
76+ fi
6777
6878 deploy :
6979 name : Deploy to Pages
You can’t perform that action at this time.
0 commit comments