-
Notifications
You must be signed in to change notification settings - Fork 18
44 lines (36 loc) · 1.12 KB
/
rustdocs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish Rust Docs
on:
push:
branches:
- main
# So github actions runner can publish the built docs to the gh-pages branch
permissions:
contents: write
jobs:
deploy-docs:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install tooling
run: |
sudo apt-get install -y protobuf-compiler
protoc --version
- name: Build rustdocs
uses: actions-rs/cargo@v1
env:
CARGO_INCREMENTAL: "0"
with:
command: doc
args: --all --no-deps
# Make an index.html file so we start at the tuxedo core
# Copied from https://github.com/substrate-developer-hub/rustdocs/blob/master/index.html
- name: Make index.html
run: echo "<meta http-equiv=refresh content=0;url=tuxedo_core/index.html>" > ./target/doc/index.html
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc