Skip to content

Commit

Permalink
Deploy rustdoc on GA (paritytech#2)
Browse files Browse the repository at this point in the history
* Deploy rustdoc on GA

* Update README.md
  • Loading branch information
liuchengxu authored Jul 3, 2024
1 parent f869503 commit efb4c6e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Rustdoc

on:
workflow_dispatch:
push:
branches:
- main

concurrency:
group: rustdoc-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10

jobs:
rustdoc:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Configure cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
# Build the rust crate docs
- name: Build Documentation
run: cargo -Zgitoxide -Zgit doc --all --no-deps --lib
env:
RUSTDOCFLAGS: "-Z unstable-options --enable-index-page"

- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: target/doc
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Subcoin: Bitcoin Full Node in Substrate

[![Continuous integration](https://github.com/subcoin-project/subcoin/actions/workflows/ci.yml/badge.svg)](https://github.com/subcoin-project/subcoin/actions/workflows/ci.yml)
[![Rustdoc](https://github.com/subcoin-project/subcoin/actions/workflows/rustdoc.yml/badge.svg)](https://github.com/subcoin-project/subcoin/actions/workflows/rustdoc.yml)

> [!WARNING]
>
Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-bitcoin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! This pallet is designed to be minimalist, containing only one storage item for maintaining the state
//! of the UTXO (Unspent Transaction Output) set by processing the inputs and outputs of each Bitcoin
//! transaction wrapped in [`Pallet::Call::transact`]. There is no verification logic within the
//! transaction wrapped in [`Call::transact`]. There is no verification logic within the
//! pallet, all validation work should be performed outside the runtime. This approach simplifies
//! off-runtime execution, allowing for easier syncing performance optimization.
Expand Down

0 comments on commit efb4c6e

Please sign in to comment.