File tree Expand file tree Collapse file tree 5 files changed +40
-4
lines changed Expand file tree Collapse file tree 5 files changed +40
-4
lines changed Original file line number Diff line number Diff line change
1
+ mkdir doc
2
+ RUSTDOCFLAGS=" --cfg docsrs" cargo doc --features use_tokio --no-deps
3
+ mv target/doc/ doc/use_tokio
4
+ RUSTDOCFLAGS=" --cfg docsrs" cargo doc --features use_async-std --no-deps
5
+ mv target/doc/ doc/use_async-std
Original file line number Diff line number Diff line change
1
+ name : Doc
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+
7
+ jobs :
8
+ deploy :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+
13
+ - name : Install Rust
14
+ uses : actions-rs/toolchain@v1
15
+ with :
16
+ toolchain : nightly
17
+ profile : minimal
18
+ override : true
19
+
20
+ - name : Generate docs
21
+ run : sh .github/workflows/doc.sh
22
+
23
+ - name : Deploy
24
+ uses : peaceiris/actions-gh-pages@v3
25
+ with :
26
+ # github_token: ${{ secrets.GITHUB_TOKEN }}
27
+ # user_name: 'github-actions[bot]'
28
+ # user_email: 'github-actions[bot]@users.noreply.github.com'
29
+ deploy_key : ${{ secrets.ACTIONS_DEPLOY_KEY }}
30
+ publish_dir : ./doc
31
+ force_orphan : true
32
+ commit_message : ${{ github.event.head_commit.message }}
Original file line number Diff line number Diff line change 1
1
/target
2
2
** /* .rs.bk
3
3
Cargo.lock
4
+ /doc
Original file line number Diff line number Diff line change 11
11
//! E.g. when using the features `use_tokio`, you will need to run all the
12
12
//! API functions from inside the tokio runtime.
13
13
#[ cfg( feature = "use_tokio" ) ]
14
- #[ cfg_attr( docsrs, doc( cfg( feature = "use_tokio" ) ) ) ]
15
14
pub mod tokio;
16
15
17
16
#[ cfg( feature = "use_async-std" ) ]
Original file line number Diff line number Diff line change 22
22
//!
23
23
//! I've not yet worked through the details of what-to-export, but I'm quite
24
24
//! willing to consider what people need or want.
25
- #![ cfg_attr( docsrs, feature( doc_cfg ) ) ]
25
+ #![ cfg_attr( docsrs, feature( doc_auto_cfg ) ) ]
26
26
extern crate rmp;
27
27
extern crate rmpv;
28
28
#[ macro_use]
@@ -48,9 +48,8 @@ pub use crate::{
48
48
} ;
49
49
50
50
#[ cfg( feature = "use_tokio" ) ]
51
- #[ cfg_attr( docsrs, doc( cfg( feature = "use_tokio" ) ) ) ]
52
51
pub mod compat {
53
- //! A re-export of tokio-util's [`Compat`](tokio_util::compat::Compat)
52
+ //! A re-export of tokio-util's [`Compat`](tokio_util::compat::Compat)
54
53
pub mod tokio {
55
54
pub use tokio_util:: compat:: Compat ;
56
55
}
You can’t perform that action at this time.
0 commit comments