Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ef896fa

Browse files
committed
Fix deploy script for beta deployment
Since the beta/ directory already exists, we can't copy the complete master dir
1 parent bb67423 commit ef896fa

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/deploy.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fi
1919

2020
if [[ $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
2323
fi
2424

2525
# Generate version index that is shown as root index page
@@ -33,12 +33,11 @@ cd out
3333
git config user.name "GHA CI"
3434
git 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-
4136
if [[ -n $TAG_NAME ]]; then
37+
if git diff --exit-code --quiet -- $TAG_NAME/; then
38+
echo "No changes to the output on this push; exiting."
39+
exit 0
40+
fi
4241
# Add the new dir
4342
git add "$TAG_NAME"
4443
# Update the symlink
@@ -47,9 +46,17 @@ if [[ -n $TAG_NAME ]]; then
4746
git add versions.json
4847
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
4948
elif [[ $BETA = "true" ]]; then
49+
if git diff --exit-code --quiet -- beta/; then
50+
echo "No changes to the output on this push; exiting."
51+
exit 0
52+
fi
5053
git add beta
5154
git commit -m "Automatic deploy to GitHub Pages (beta): ${SHA}"
5255
else
56+
if git diff --exit-code --quiet; then
57+
echo "No changes to the output on this push; exiting."
58+
exit 0
59+
fi
5360
git add .
5461
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
5562
fi

0 commit comments

Comments
 (0)