Skip to content

Commit f78b016

Browse files
committed
Fix doc deploy
1 parent 9a517ed commit f78b016

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

deploy_docs.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ echo "Generating docs..."
2323
mix docs
2424

2525
# Push to GitHub
26-
echo "Pushing to GitHub..."
26+
echo "Checking GitHub..."
2727
cd doc
2828
git add .
29-
git commit -m "Update docs"
30-
git push -u origin gh-pages:gh-pages --force
29+
if git diff-index --quiet HEAD;
30+
then
31+
echo "Nothing to update."
32+
else
33+
echo "Pushing to GitHub..."
34+
git commit -m "Update docs"
35+
git push -u origin gh-pages:gh-pages --force
36+
fi
3137

3238
# Exit successfully
3339
exit 0

0 commit comments

Comments
 (0)