Skip to content

Update build_and_publish_docs.yaml #4

Update build_and_publish_docs.yaml

Update build_and_publish_docs.yaml #4

name: Build and Publish Docs
on:
pull_request:
push:
branches: [ 'main' ]
# 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: "pages"
cancel-in-progress: false
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: cargo doc
run: cargo doc
- name: copy to gh-pages
run: cp -r ./target/doc ./gh-pages
- name: Archive Compatibility Matrix For Download
uses: actions/upload-pages-artifact@v3
with:
path: ./target/doc
publish_to_gh_pages:
needs: build_docs
if: github.ref == 'refs/heads/main'
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Update git pages with new compatibiliy matrix
id: deployment
uses: actions/deploy-pages@v4