ci(docs): skip releases without docs source

This commit is contained in:
Neil
2026-08-31 00:52:22 -07:00
parent 649c188cc4
commit 0edda5e86f
+17
View File
@@ -174,6 +174,23 @@ jobs:
fi
echo "commit_sha=$commit_sha" >> "$GITHUB_OUTPUT"
# Stable tags cut before the docs package was merged are valid Orca
# releases, but cannot produce a docs deployment. Skip them before
# requesting the protected production environment.
docs_source_available=false
for attempt in 1 2 3; do
if gh api "repos/$GITHUB_REPOSITORY/contents/docs/site/package.json?ref=$commit_sha" >/dev/null 2>&1; then
docs_source_available=true
break
fi
[[ "$attempt" -eq 3 ]] || sleep "$((attempt * 5))"
done
if [[ "$docs_source_available" != "true" ]]; then
echo "Release $tag does not contain docs/site; skipping docs deployment."
echo "deploy=false" >> "$GITHUB_OUTPUT"
exit 0
fi
deploy=false
if [[ "$authorized_ref" == "true" && "$authorized_author" == "true" && "$release_state_ok" == "true" ]]; then
deploy=true