Skip to content

Commit

Permalink
Add workflow for Rustdocs (#925)
Browse files Browse the repository at this point in the history
* Add workflow for Rustdocs

* Remove the test branch from the workflow
  • Loading branch information
gruberb authored Aug 25, 2022
1 parent 06d5d09 commit 940b1d8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
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

0 comments on commit 940b1d8

Please sign in to comment.