File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -14,22 +14,40 @@ jobs:
14
14
with :
15
15
profile : minimal
16
16
toolchain : stable
17
- -
uses :
actions-rs/[email protected]
18
- with :
19
- crate : mdbook
20
- version : latest
21
- use-tool-cache : true
17
+
22
18
- name : Install Python dependencies
23
19
run : |
24
20
pip3 install --user python-dateutil linkchecker
25
21
- name : Put pip binary directory into path
26
22
run : echo "~/.local/bin" >> $GITHUB_PATH
23
+
24
+ - name : Cache Cargo installed binaries
25
+ uses : actions/cache@v1
26
+ id : cache-cargo
27
+ with :
28
+ path : ~/cargo-bin
29
+ key : cache-cargo
30
+ - name : Install mdbook
31
+ if : steps.cache-cargo.outputs.cache-hit != 'true'
32
+ uses :
actions-rs/[email protected]
33
+ with :
34
+ crate : mdbook
35
+ version : latest
36
+ - name : Copy mdbook to cache directory
37
+ if : steps.cache-cargo.outputs.cache-hit != 'true'
38
+ run : |
39
+ mkdir ~/cargo-bin
40
+ cp ~/.cargo/bin/mdbook ~/cargo-bin
41
+ - name : Put new cargo binary directory into path
42
+ run : echo "~/cargo-bni" >> $GITHUB_PATH
43
+
27
44
- name : Build book
28
45
run : mdbook build
29
46
- name : Test book
30
47
run : mdbook test
31
48
- name : Check links
32
49
run : linkchecker book
50
+
33
51
- name : Deploy book
34
52
if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
35
53
uses : peaceiris/actions-gh-pages@v3
You can’t perform that action at this time.
0 commit comments