Skip to content

Commit 823a5e8

Browse files
authored
Merge pull request #2665 from ehuss/devel-deploy
Deploy docs for latest master.
2 parents 90c8401 + 5b14d1c commit 823a5e8

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/deploy-docs.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,37 @@ on:
44
push:
55
branches:
66
- stable
7+
- master
78

89
jobs:
910
doc:
1011
name: Documentation
1112
runs-on: ubuntu-latest
1213
steps:
1314
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
1417
- name: Install mdbook
1518
run: |
1619
mkdir mdbook
17-
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
20+
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.6/mdbook-v0.4.6-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
1821
echo "`pwd`/mdbook" >> $GITHUB_PATH
1922
- name: Build book
20-
run: cd doc && mdbook build
23+
run: |
24+
git checkout stable
25+
cd doc
26+
mdbook build
27+
mv book ${{ runner.temp }}
28+
git checkout master
29+
mdbook build
30+
mv book ${{ runner.temp }}/book/devel
2131
- name: Deploy to GitHub
2232
run: |
23-
cd doc/book
33+
cd ${{ runner.temp }}/book
2434
git init
2535
git config user.name "Deploy from CI"
2636
git config user.email ""
2737
git add . .nojekyll
28-
git commit -m "Deploy $GITHUB_SHA to gh-pages"
38+
git commit -m "Deploy $GITHUB_REF $GITHUB_SHA to gh-pages"
2939
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
3040
git push --force --set-upstream origin master:gh-pages

0 commit comments

Comments
 (0)