19
19
20
20
if [[ $BETA = " true" ]]; then
21
21
echo " Update documentation for the beta release"
22
- cp -r out/master out/beta
22
+ cp -r out/master/ * out/beta
23
23
fi
24
24
25
25
# Generate version index that is shown as root index page
@@ -33,12 +33,13 @@ cd out
33
33
git config user.name " GHA CI"
34
34
git config user.email
" [email protected] "
35
35
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
-
41
36
if [[ -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
42
43
# Add the new dir
43
44
git add " $TAG_NAME "
44
45
# Update the symlink
@@ -47,9 +48,17 @@ if [[ -n $TAG_NAME ]]; then
47
48
git add versions.json
48
49
git commit -m " Add documentation for ${TAG_NAME} release: ${SHA} "
49
50
elif [[ $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
50
55
git add beta
51
56
git commit -m " Automatic deploy to GitHub Pages (beta): ${SHA} "
52
57
else
58
+ if git diff --exit-code --quiet; then
59
+ echo " No changes to the output on this push; exiting."
60
+ exit 0
61
+ fi
53
62
git add .
54
63
git commit -m " Automatic deploy to GitHub Pages: ${SHA} "
55
64
fi
0 commit comments