mirror of
https://github.com/stablyai/orca.git
synced 2026-10-01 16:02:03 +00:00
ci(docs): skip releases without docs source
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user