File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and host documentation
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+
7
+ jobs :
8
+ build :
9
+ name : Build documentation
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Install Protoc
13
+ uses : arduino/setup-protoc@v1
14
+ - name : Checkout
15
+ uses : actions/checkout@v3
16
+ - name : Install nightly toolchain
17
+ run : rustup toolchain install nightly
18
+ - name : Build Documentation
19
+ run : cargo +nightly doc --no-deps --workspace -F full
20
+ env :
21
+ RUSTDOCFLAGS : " --cfg docsrs"
22
+ RUSTFLAGS : " --cfg docsrs"
23
+ - name : Add index file
24
+ run : |
25
+ mkdir host-docs
26
+ echo "<meta http-equiv=\"refresh\" content=\"0; url=libp2p\">" > target/doc/index.html
27
+ cp -r target/doc/* ./host-docs
28
+ - name : Upload documentation
29
+ uses : actions/upload-pages-artifact@v1.0.4
30
+ with :
31
+ path : " host-docs/"
32
+
33
+ deploy :
34
+ name : Deploy documentation
35
+ needs : build
36
+ permissions :
37
+ pages : write
38
+ id-token : write
39
+
40
+ environment :
41
+ name : github-pages
42
+ url : ${{ steps.deployment.outputs.page_url }}
43
+ runs-on : ubuntu-latest
44
+ steps :
45
+ - name : Deploy to GitHub Pages
46
+ id : deployment
47
+ uses : actions/deploy-pages@v1
48
+
You can’t perform that action at this time.
0 commit comments