File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- stable
7
+ - master
7
8
8
9
jobs :
9
10
doc :
10
11
name : Documentation
11
12
runs-on : ubuntu-latest
12
13
steps :
13
14
- uses : actions/checkout@v2
15
+ with :
16
+ fetch-depth : 0
14
17
- name : Install mdbook
15
18
run : |
16
19
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
18
21
echo "`pwd`/mdbook" >> $GITHUB_PATH
19
22
- 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
21
31
- name : Deploy to GitHub
22
32
run : |
23
- cd doc /book
33
+ cd ${{ runner.temp }} /book
24
34
git init
25
35
git config user.name "Deploy from CI"
26
36
git config user.email ""
27
37
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"
29
39
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
30
40
git push --force --set-upstream origin master:gh-pages
You can’t perform that action at this time.
0 commit comments