From 0d00115543aeefddcb983de7535a34c075668d6e Mon Sep 17 00:00:00 2001 From: Bastian Gruber Date: Thu, 25 Aug 2022 13:00:43 +0200 Subject: [PATCH 1/2] Add workflow for Rustdocs --- .github/workflows/docs.yml | 37 ++++++++++++++++++++++++++++++++ ci/create_index_for_rust_docs.sh | 3 +++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100755 ci/create_index_for_rust_docs.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..ef1e1f5e1b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,37 @@ +name: Rustdoc +on: + push: + branches: + - parachain + - rustdocs +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 \ No newline at end of file diff --git a/ci/create_index_for_rust_docs.sh b/ci/create_index_for_rust_docs.sh new file mode 100755 index 0000000000..0216f1a4b9 --- /dev/null +++ b/ci/create_index_for_rust_docs.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "" > ./target/doc/index.html \ No newline at end of file From 51189501754335d34fbc127358d7c496d7ffa860 Mon Sep 17 00:00:00 2001 From: Bastian Gruber Date: Thu, 25 Aug 2022 14:31:46 +0200 Subject: [PATCH 2/2] Remove the test branch from the workflow --- .github/workflows/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ef1e1f5e1b..1969621770 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,6 @@ on: push: branches: - parachain - - rustdocs jobs: docs: runs-on: ubuntu-latest @@ -34,4 +33,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: gh-pages publish_dir: ./target/doc - force_orphan: true \ No newline at end of file + force_orphan: true