Also deploy from the beta branch

This commit is contained in:
flip1995 2020-03-25 20:01:11 +01:00
parent d7440a0d7c
commit aa1ad42736
No known key found for this signature in database
GPG key ID: 2CEFCDB27ED0BE79
4 changed files with 16 additions and 1 deletions

10
.github/deploy.sh vendored
View file

@ -17,6 +17,11 @@ if [[ -n $TAG_NAME ]]; then
ln -s "$TAG_NAME" out/stable
fi
if [[ $BETA = "true" ]]; then
echo "Update documentation for the beta release"
cp -r out/master out/beta
fi
# Generate version index that is shown as root index page
cp util/gh-pages/versions.html out/index.html
@ -35,12 +40,15 @@ fi
if [[ -n $TAG_NAME ]]; then
# Add the new dir
git add $TAG_NAME
git add "$TAG_NAME"
# Update the symlink
git add stable
# Update versions file
git add versions.json
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
elif [[ $BETA = "true" ]]; then
git add beta
git commit -m "Automatic deploy to GitHub Pages (beta): ${SHA}"
else
git add .
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"

View file

@ -4,6 +4,7 @@ on:
push:
branches:
- master
- beta
tags:
- rust-1.**
@ -34,6 +35,9 @@ jobs:
run: |
TAG=$(basename ${{ github.ref }})
echo "::set-env name=TAG_NAME::$TAG"
- name: Set beta to true
if: github.ref == 'refs/heads/beta'
run: echo "::set-env name=BETA::true"
- name: Deploy
run: |
eval "$(ssh-agent -s)"

View file

@ -65,6 +65,7 @@
$scope.versionOrder = function(v) {
if (v === 'master') { return Infinity; }
if (v === 'stable') { return Number.MAX_VALUE; }
if (v === 'beta') { return Number.MAX_VALUE - 1; }
return $scope.normalizeVersion(v)
.split('.')

View file

@ -12,6 +12,8 @@ def key(v):
return float('inf')
if v == 'stable':
return sys.maxsize
if v == 'beta':
return sys.maxsize - 1
v = v.replace('v', '').replace('rust-', '')