Skip to content

Commit 607aa50

Browse files
StaticRocketcshilwant
authored andcommitted
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 <rs@ti.com>
1 parent 41862ca commit 607aa50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.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)