This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
Add migration warnings to README #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Rust Docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-docs: | |
name: Deploy docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
# With rustup's nice new toml format, we just need to run rustup show to install the toolchain | |
# https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 | |
- name: Setup Rust toolchain | |
run: rustup show | |
#TODO consider using the rust Cache action like tin the rust CI | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-doc-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build rustdocs | |
uses: actions-rs/cargo@v1 | |
env: | |
CARGO_INCREMENTAL: "0" | |
with: | |
command: doc | |
args: --all --no-deps | |
# Make an index.html file so we start at the nimbus consensus worker | |
# Copied from https://github.com/substrate-developer-hub/rustdocs/blob/master/index.html | |
- name: Make index.html | |
run: echo "<meta http-equiv=refresh content=0;url=nimbus_consensus/index.html>" > ./target/doc/index.html | |
- name: Deploy documentation | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./target/doc |