From 0edda5e86f7b573ee355380bb67f481920f01339 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Mon, 31 Aug 2026 00:52:22 -0700 Subject: [PATCH] ci(docs): skip releases without docs source --- .github/workflows/docs.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7308cf5408b..69a487607b0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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