Skip to content

Commit ac2e10a

Browse files
committed
Auto merge of #5235 - flip1995:tag_deploy_fix, r=phansch
Fix deploy script for tag deploys By hand updating the documentation for the `rust-1.41.1` release, I found, that the deploy script was buggy for tag deploys. Luckily we weren't affected yet (will only run if the commit of the tag already has the workflow config, so probably ~`rust-1.43.0`) The bug: When a tag was deployed, until now it also updated the master documentation to the state of the tag. This was because the `git add .` not only updated the files created or modified by the tag commit, but also the master lints.json file. changelog: none
2 parents 329923e + f822497 commit ac2e10a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/deploy.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@ if git diff --exit-code --quiet; then
3333
exit 0
3434
fi
3535

36-
git add .
37-
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
36+
if [[ -n $TAG_NAME ]]; then
37+
# Add the new dir
38+
git add $TAG_NAME
39+
# Update the symlink
40+
git add stable
41+
# Update versions file
42+
git add versions.json
43+
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
44+
else
45+
git add .
46+
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
47+
fi
3848

3949
git push "$SSH_REPO" "$TARGET_BRANCH"

0 commit comments

Comments
 (0)