Skip to content

Commit

Permalink
Deploy user guide via mdbook (#10)
Browse files Browse the repository at this point in the history
* Add docs

* Build mdbook in CI

* Add getting_started.md

* Test

* .

* Add User Guide badge

* Nicer badge

* Update README.md
  • Loading branch information
liuchengxu authored Jul 10, 2024
1 parent 880bcf9 commit ab2fd8e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/rustdoc.yml → .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Rustdoc
name: Docs

on:
workflow_dispatch:
push:
branches:
- main
- main

permissions:
contents: write
Expand All @@ -19,7 +19,7 @@ env:
RUSTUP_MAX_RETRIES: 10

jobs:
rustdoc:
docs:
runs-on: ubuntu-22.04

steps:
Expand Down Expand Up @@ -47,12 +47,17 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-
# Build the rust crate docs
- name: Build Documentation
- name: Build Rustdoc
run: cargo +nightly -Zgitoxide -Zgit doc --all --no-deps --lib
env:
RUSTDOCFLAGS: "-Z unstable-options --enable-index-page"

- name: Build User Guide
run: |
cargo install --vers "^0.4" mdbook
mdbook build docs && mdbook test docs
mv docs/book target/doc
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![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)
[![Static Badge](https://img.shields.io/badge/User%20Guide-blue?logo=mdBook&logoColor=%23292b2e&link=https%3A%2F%2Fsubcoin-project.github.io%2Fsubcoin%2Fbook)](https://subcoin-project.github.io/subcoin/book)

> [!WARNING]
>
Expand Down
3 changes: 3 additions & 0 deletions docs/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Subcoin

Subcoin is Bitcoin full node implemented in the Substrate framework.
7 changes: 7 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Summary

[Introduction](README.md)

# User Guide

- [Getting Started](getting_started.md)
9 changes: 9 additions & 0 deletions docs/src/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Getting Started

## Installation

### Build from source

### Docker

## Run

0 comments on commit ab2fd8e

Please sign in to comment.