File tree Expand file tree Collapse file tree 6 files changed +146
-171
lines changed Expand file tree Collapse file tree 6 files changed +146
-171
lines changed Original file line number Diff line number Diff line change 46
46
with :
47
47
toolchain : ${{ matrix.rust }}
48
48
override : true
49
- - name : Ready cache
50
- if : matrix.os == 'ubuntu-latest'
51
- run : sudo chown -R $(whoami):$(id -ng) ~/.cargo/
52
- - name : Cache cargo
53
- uses : actions/cache@v1
54
- id : cache
55
- with :
56
- path : |
57
- ~/.cargo/registry/index
58
- ~/.cargo/registry/cache
59
- ~/.cargo/git
60
- target
61
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
49
+ - uses : Swatinem/rust-cache@v2
62
50
- name : Test twitch_oauth2
63
51
uses : actions-rs/cargo@v1
64
52
with :
91
79
toolchain : nightly
92
80
override : true
93
81
components : clippy
94
- - name : Cache cargo
95
- uses : actions/cache@v1
96
- id : cache
97
- with :
98
- path : |
99
- ~/.cargo/registry/index
100
- ~/.cargo/registry/cache
101
- ~/.cargo/git
102
- target
103
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
82
+ - uses : Swatinem/rust-cache@v2
104
83
- name : Run clippy
105
84
uses : actions-rs/cargo@v1
106
85
with :
@@ -121,16 +100,7 @@ jobs:
121
100
profile : minimal
122
101
toolchain : nightly
123
102
override : true
124
- - name : Cache cargo
125
- uses : actions/cache@v1
126
- id : cache
127
- with :
128
- path : |
129
- ~/.cargo/registry/index
130
- ~/.cargo/registry/cache
131
- ~/.cargo/git
132
- target
133
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
103
+ - uses : Swatinem/rust-cache@v2
134
104
# We do the following to make sure docs.rs can document properly without anything broken, and that docs are working.
135
105
- name : Run doc tests
136
106
uses : actions-rs/cargo@v1
Original file line number Diff line number Diff line change 1
1
name : github pages
2
2
env :
3
3
CI_TWITCH_OAUTH2_FEATURES : " all mock_api"
4
- RUSTDOCFLAGS : " -Z unstable-options --html-in-header=docs/pre-content.html --cfg nightly"
5
- RUSTFLAGS : " --cfg nightly"
6
4
on :
7
5
push :
8
6
branches :
@@ -17,29 +15,13 @@ jobs:
17
15
profile : minimal
18
16
toolchain : nightly
19
17
override : true
20
- - name : Cache cargo
21
- uses : actions/cache@v1
22
- id : cache
23
- with :
24
- path :
25
- ~/.cargo/registry/index
26
- ~/.cargo/registry/cache
27
- ~/.cargo/git
28
- target
29
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30
- - name : mention 40 character commit rev in doc
31
- run : sed -i "s/{{commit}}/$(git rev-parse HEAD)/g" docs/pre-content.html
32
- - name : mention short commit rev in doc
33
- run : sed -i "s/{{commit_short}}/$(git rev-parse --short HEAD)/g" docs/pre-content.html
18
+ - uses : Swatinem/rust-cache@v2
34
19
- name : build twitch_oauth2 docs
35
- uses : actions-rs/cargo@v1
36
- with :
37
- command : doc
38
- args : --no-deps --features "${{ env.CI_TWITCH_OAUTH2_FEATURES }}"
20
+ run : cargo xtask doc
39
21
- name : move index.html
40
- run : cp ./docs/index.html ./target/doc/index.html
22
+ run : cp ./docs/index.html ./target/extra/ doc/index.html
41
23
- name : Deploy
42
24
uses : peaceiris/actions-gh-pages@v3
43
25
with :
44
26
github_token : ${{ secrets.GITHUB_TOKEN }}
45
- publish_dir : ./target/doc
27
+ publish_dir : ./target/extra/ doc
You can’t perform that action at this time.
0 commit comments