Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow for Rustdocs #925

Merged
merged 2 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Rustdoc
on:
push:
branches:
- parachain
jobs:
docs:
runs-on: ubuntu-latest
env:
RUST_TOOLCHAIN: "nightly-2022-05-09"
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install latest nightly
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
default: true

- name: Build Documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: --all --no-deps

- name: Create Index file
run: ./ci/create_index_for_rust_docs.sh

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
force_orphan: true
3 changes: 3 additions & 0 deletions ci/create_index_for_rust_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

echo "<meta http-equiv=\"refresh\" content=\"0; url=centrifuge_chain/index.html\">" > ./target/doc/index.html