changing docs generation

This commit is contained in:
Andy Pack 2024-01-30 22:11:04 +00:00
parent bc367e7814
commit 6367671094
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

View File

@ -5,10 +5,17 @@ on:
push: push:
branches: ["master"] branches: ["master"]
# Allow one concurrent deployment # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency: concurrency:
group: "build" group: "pages"
cancel-in-progress: true cancel-in-progress: false
jobs: jobs:
# Build job # Build job
@ -34,12 +41,18 @@ jobs:
command: test command: test
doc: doc:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [ build ] # for ignoring bad builds needs: [ build ] # for ignoring bad builds
if: github.event_name == 'push' && github.ref == 'refs/heads/master' if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
@ -49,8 +62,12 @@ jobs:
- name: Build Docs - name: Build Docs
run: cargo doc --no-deps --document-private-items run: cargo doc --no-deps --document-private-items
- name: Deploy To Pages - name: Upload artifact
uses: peaceiris/actions-gh-pages@v3 uses: actions/upload-pages-artifact@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Upload entire repository
publish_dir: ./target/doc path: './target/doc'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4