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

Commit aa1ad42

Browse files
committed
Also deploy from the beta branch
1 parent d7440a0 commit aa1ad42

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.github/deploy.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [[ -n $TAG_NAME ]]; then
1717
ln -s "$TAG_NAME" out/stable
1818
fi
1919

20+
if [[ $BETA = "true" ]]; then
21+
echo "Update documentation for the beta release"
22+
cp -r out/master out/beta
23+
fi
24+
2025
# Generate version index that is shown as root index page
2126
cp util/gh-pages/versions.html out/index.html
2227

@@ -35,12 +40,15 @@ fi
3540

3641
if [[ -n $TAG_NAME ]]; then
3742
# Add the new dir
38-
git add $TAG_NAME
43+
git add "$TAG_NAME"
3944
# Update the symlink
4045
git add stable
4146
# Update versions file
4247
git add versions.json
4348
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
49+
elif [[ $BETA = "true" ]]; then
50+
git add beta
51+
git commit -m "Automatic deploy to GitHub Pages (beta): ${SHA}"
4452
else
4553
git add .
4654
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- beta
78
tags:
89
- rust-1.**
910

@@ -34,6 +35,9 @@ jobs:
3435
run: |
3536
TAG=$(basename ${{ github.ref }})
3637
echo "::set-env name=TAG_NAME::$TAG"
38+
- name: Set beta to true
39+
if: github.ref == 'refs/heads/beta'
40+
run: echo "::set-env name=BETA::true"
3741
- name: Deploy
3842
run: |
3943
eval "$(ssh-agent -s)"

util/gh-pages/versions.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ <h3 class="panel-title">
6565
$scope.versionOrder = function(v) {
6666
if (v === 'master') { return Infinity; }
6767
if (v === 'stable') { return Number.MAX_VALUE; }
68+
if (v === 'beta') { return Number.MAX_VALUE - 1; }
6869

6970
return $scope.normalizeVersion(v)
7071
.split('.')

util/versions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ def key(v):
1212
return float('inf')
1313
if v == 'stable':
1414
return sys.maxsize
15+
if v == 'beta':
16+
return sys.maxsize - 1
1517

1618
v = v.replace('v', '').replace('rust-', '')
1719

0 commit comments

Comments
 (0)