From 0cc2a9d4ba43a8b99112a25a3442a3b4e24c4507 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 24 Mar 2023 18:17:17 +0100 Subject: [PATCH] build(github): deploy docs to github pages --- .github/workflows/rust.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 79f8314a..4451cfc7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -30,12 +30,30 @@ jobs: run: cargo fmt --all -- --check docs: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: ./.github/actions/deps - - name: Check documentation generation + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Generate documentation shell: bash env: RUSTDOCFLAGS: "--cfg docsrs" run: cargo doc --no-deps --all-features + + - name: Upload docs + uses: actions/upload-pages-artifact@v1 + with: + # Upload entire repository + path: "target/doc" + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1