Skip to content
Permalink
Browse files

Fix bug referring wrong commit in gh-pages commits

  • Loading branch information...
dahlia committed Jun 20, 2019
1 parent f418686 commit 1be714a174af49ef13b1a6492f3dcd493859bbaf
Showing with 2 additions and 1 deletion.
  1. +2 −1 Docs/publish.sh
@@ -73,6 +73,7 @@ for _ in 1 2 3; do
git -C /tmp/gh-pages add "/tmp/gh-pages/$slug"

latest_version="$(git tag --sort -v:refname | head -n1)"
commit_hash="$(git log -n1 --pretty=%H)"
tag="$(echo -n "$GITHUB_REF" | sed -e 's/^refs\/tags\///g')"
if [ "$(git tag -l)" = "" ] || [ "$latest_version" = "$tag" ]; then
index="$(cat "/tmp/gh-pages/$slug/index.html")"
@@ -87,7 +88,7 @@ for _ in 1 2 3; do

git -C /tmp/gh-pages commit \
--allow-empty \
-m "Publish docs from $GITHUB_SHA"
-m "Publish docs from $commit_hash"

if git -C /tmp/gh-pages push origin gh-pages; then
break

0 comments on commit 1be714a

Please sign in to comment.
You can’t perform that action at this time.