From 899c28499584faf86dbd85bc638ba80f5e51c0e6 Mon Sep 17 00:00:00 2001 From: supernovahs Date: Sat, 11 May 2024 13:38:07 +0530 Subject: [PATCH] update yml docs --- .github/workflows/doc.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index f21dc304..e067a0bd 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -1,4 +1,4 @@ -name: docs +name: Deploy docs to pages on: push: @@ -6,6 +6,10 @@ on: pull_request: branches: [ "main" ] +permissions: + contents: read + pages: write + id-token: write jobs: build_docs: @@ -19,9 +23,21 @@ jobs: - name: Run tests run: cargo test --verbose - name: Generate documentation - run: cargo doc + run: cargo doc --no-deps --workspace - name: Upload documentation - uses: actions/upload-artifact@v3 + uses: actions/upload-pages-artifact@v3 with: name: documentation - path: target/doc/** \ No newline at end of file + path: target/doc/** + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build_docs + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file