changing docs generation
This commit is contained in:
parent
bc367e7814
commit
6367671094
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
@ -5,10 +5,17 @@ on:
|
||||
push:
|
||||
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:
|
||||
group: "build"
|
||||
cancel-in-progress: true
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Build job
|
||||
@ -34,12 +41,18 @@ jobs:
|
||||
command: test
|
||||
|
||||
doc:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build ] # for ignoring bad builds
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
@ -49,8 +62,12 @@ jobs:
|
||||
- name: Build Docs
|
||||
run: cargo doc --no-deps --document-private-items
|
||||
|
||||
- name: Deploy To Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./target/doc
|
||||
# Upload entire repository
|
||||
path: './target/doc'
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
Loading…
Reference in New Issue
Block a user