From 994948f2dac4eb243c8abe8e02fec33541d07905 Mon Sep 17 00:00:00 2001 From: Manojna Date: Fri, 22 Sep 2023 12:23:48 +0530 Subject: [PATCH] ci-cd: deploy docs to github pages --- .github/workflows/doc.yml | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/doc.yml diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..5ea24e6 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,43 @@ +name: Docs + +on: + push: + branches: + - main + +jobs: + rustdoc: + name: Rustdoc + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + + - name: Create rustdoc + run: cargo doc --document-private-items + + - name: Upload artifacts + uses: actions/upload-pages-artifact@v2 + with: + path: target/doc + + deploy: + needs: build + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2