Skip to content

Commit 1cd222a

Browse files
committed
ci(previews): fix index identifier function
Find operates in breadth-first by default. There can only be one index per directory. Might as well shorten this find expression to print and bail out after the first match. Also resolves the issue where other non-root index files will be picked as the root index due to sorting precedence. Signed-off-by: Randolph Sapp <[email protected]>
1 parent 0699d1b commit 1cd222a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
EOF
3939
4040
for path in build/*/; do
41-
root_index=$(find "$path" -name index.html | sort -u | tail -1)
41+
root_index=$(find "$path" -name index.html -print -quit)
4242
if [ -n "$root_index" ]; then
4343
text=$(basename "$path")
4444
relative_path=$(realpath "$root_index" --relative-to=build)

0 commit comments

Comments
 (0)