Skip to content

Commit 241923e

Browse files
committed
fix preview folder fetching
1 parent c44f63a commit 241923e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ci/cleanup-pr-previews

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ echo -e "${GREEN}[INFO]${NC} All prerequisites satisfied"
104104
echo -e "${YELLOW}[INFO]${NC} Fetching PR preview folders from gh-pages branch..."
105105

106106
# Get the list of pr-XXXXX folders from gh-pages branch
107-
PR_FOLDERS=$(gh api repos/"${REPOSITORY}"/contents/docs/pr-preview \
107+
PR_FOLDERS=$(gh api repos/"${REPOSITORY}"/contents/docs/pr-preview?ref=gh-pages \
108108
--header "Accept: application/vnd.github+json" \
109109
--jq '.[] | select(.type == "dir" and (.name | test("^pr-[0-9]+$"))) | .name' \
110-
--field ref=gh-pages 2>/dev/null || true)
110+
2>/dev/null || true)
111111

112112
if [[ -z "$PR_FOLDERS" ]]; then
113113
echo -e "${YELLOW}[INFO]${NC} No PR preview folders found in gh-pages branch"

0 commit comments

Comments
 (0)