Skip to content

Commit 759e79c

Browse files
authored
chore: publish autogenerated docs to github pages on push to the main branch (#93)
Adds a CI task that generates the pallet docs and uploads them to [github pages](http://renlabs-dev.github.io/torus-substrate/pallet_torus0) Closes CHAIN-75
1 parent 44f90b8 commit 759e79c

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/build-docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build docs and publish to github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
permissions:
11+
contents: read
12+
id-token: write
13+
pages: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup Rust cache
19+
uses: Swatinem/rust-cache@v2
20+
21+
- name: Install Rust toolchain
22+
run: |
23+
rustup set profile minimal
24+
rustup show
25+
26+
- name: Install Protoc
27+
uses: arduino/setup-protoc@v1
28+
with:
29+
version: 3.20.1
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Generate Docs
33+
run: |
34+
cargo doc --workspace --no-deps
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v5
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: 'target/doc/'
43+
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ We maintain several documentation files to help you understand and contribute to
129129

130130
- [docs/xtask-manual.md](docs/xtask-manual.md): Comprehensive guide to the `xtask` command-line tool that simplifies local development, testing, and network simulation
131131

132+
- [pallet_emission0 docs](https://renlabs-dev.github.io/torus-substrate/pallet_emission0): Generated docs for the crate `pallet_emission0`
133+
134+
- [pallet_governance docs](https://renlabs-dev.github.io/torus-substrate/pallet_governance): Generated docs for the crate `pallet_governance`
135+
136+
- [pallet_permission0 docs](https://renlabs-dev.github.io/torus-substrate/pallet_permission0): Generated docs for the crate `pallet_permission0`
137+
138+
- [pallet_torus0 docs](https://renlabs-dev.github.io/torus-substrate/pallet_torus0): Generated docs for the crate `pallet_torus0`
139+
132140
## Terminology
133141

134142
We have some specific terminology throughout the codebase, so here's a list of the most important ones:

0 commit comments

Comments
 (0)