-
Notifications
You must be signed in to change notification settings - Fork 328
46 lines (42 loc) · 1.19 KB
/
cargo-doc.yaml
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
45
46
name: API Docs
on:
push:
branches:
- master
paths:
- .github/workflows/cargo-doc.yml
- Cargo.toml
- Cargo.lock
- crates/**
pull_request:
paths:
- .github/workflows/cargo-doc.yml
- Cargo.toml
- Cargo.lock
- crates/**
# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
cargo-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2024-04-21
- name: Build API documentation
uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: "--cfg docsrs"
with:
command: doc
args: --all-features
- name: Push API documentation to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.IBC_RS_DOC_PRIVATE_KEY }}
external_repository: informalsystems/hermes-api-doc
publish_dir: ./target/doc