Skip to content

Commit afbdb1f

Browse files
Copilothsluoyz
andcommitted
Improve verification logic to be more resilient
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
1 parent 2065433 commit afbdb1f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/deploy-web.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,15 @@ jobs:
4545
exit 1
4646
fi
4747
48+
# Apply path fixes
4849
sed -i "s|href=\"/favicon.ico\"|href=\"/${REPO_NAME}/favicon.ico\"|g" dist/index.html
4950
sed -i "s|src=\"/_expo/|src=\"/${REPO_NAME}/_expo/|g" dist/index.html
5051
51-
# Verify the changes were applied
52-
if ! grep -q "/${REPO_NAME}/favicon.ico" dist/index.html || ! grep -q "/${REPO_NAME}/_expo/" dist/index.html; then
53-
echo "Error: Failed to update paths in index.html"
52+
# Verify that at least one of the expected patterns was updated
53+
# (Expo-generated index.html should have both, but this is more resilient)
54+
if ! grep -q "/${REPO_NAME}/" dist/index.html; then
55+
echo "Error: No paths were updated in index.html"
56+
cat dist/index.html
5457
exit 1
5558
fi
5659

0 commit comments

Comments
 (0)