1919
2020if [[ $BETA = " true" ]]; then
2121 echo " Update documentation for the beta release"
22- cp -r out/master out/beta
22+ cp -r out/master/ * out/beta
2323fi
2424
2525# Generate version index that is shown as root index page
@@ -33,12 +33,13 @@ cd out
3333git config user.name " GHA CI"
3434git config user.email " gha@ci.invalid"
3535
36- if git diff --exit-code --quiet; then
37- echo " No changes to the output on this push; exiting."
38- exit 0
39- fi
40-
4136if [[ -n $TAG_NAME ]]; then
37+ # track files, so that the following check works
38+ git add --intent-to-add " $TAG_NAME "
39+ if git diff --exit-code --quiet -- $TAG_NAME /; then
40+ echo " No changes to the output on this push; exiting."
41+ exit 0
42+ fi
4243 # Add the new dir
4344 git add " $TAG_NAME "
4445 # Update the symlink
@@ -47,9 +48,17 @@ if [[ -n $TAG_NAME ]]; then
4748 git add versions.json
4849 git commit -m " Add documentation for ${TAG_NAME} release: ${SHA} "
4950elif [[ $BETA = " true" ]]; then
51+ if git diff --exit-code --quiet -- beta/; then
52+ echo " No changes to the output on this push; exiting."
53+ exit 0
54+ fi
5055 git add beta
5156 git commit -m " Automatic deploy to GitHub Pages (beta): ${SHA} "
5257else
58+ if git diff --exit-code --quiet; then
59+ echo " No changes to the output on this push; exiting."
60+ exit 0
61+ fi
5362 git add .
5463 git commit -m " Automatic deploy to GitHub Pages: ${SHA} "
5564fi
0 commit comments