Skip to content

Commit cf27c83

Browse files
authored
Merge pull request #131 from hashed-io/cicd/add-docs-action
Cicd/add docs action
2 parents dc5ca87 + 0c429e2 commit cf27c83

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Rust Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
deploy-docs:
10+
name: Deploy docs
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Rust versions
18+
run: rustup show
19+
20+
- name: Rust cache
21+
uses: Swatinem/rust-cache@v1
22+
23+
- name: Build rustdocs
24+
run: SKIP_WASM_BUILD=1 cargo doc --all --no-deps
25+
26+
- name: Make index.html
27+
run: echo "<meta http-equiv=refresh content=0;url=hashed_substrate/index.html>" > ./target/doc/index.html
28+
29+
- name: Deploy documentation
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_branch: gh-pages
34+
publish_dir: ./target/doc

0 commit comments

Comments
 (0)