Skip to content

Commit a637c0e

Browse files
authored
fix: Updates post-build.sh to add index.html; adds conditional check. (#122)
1 parent a12a7cb commit a637c0e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

post-build.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,21 @@
1414

1515
#!/bin/bash
1616

17+
echo ">>>Running post-build.sh"
18+
19+
#!/bin/bash
20+
1721
# Checkout the dist branch
1822
git checkout dist || git checkout -b dist
1923

2024
# Add and commit the changes to the dist folder
2125
git add dist
22-
git commit -m "Update dist folder"
26+
git add index.html
2327

24-
# Push the changes to the dist branch
25-
git push origin dist
28+
# Check if there are any changes to commit
29+
if [[ -n $(git status --porcelain) ]]; then
30+
git commit -m "Update dist folder"
31+
git push origin dist
32+
else
33+
echo "No changes to commit"
34+
fi

0 commit comments

Comments
 (0)