name: Update Docs
permissions:
contents: read
pages: write
checks: write
statuses: write
id-token: write
on:
workflow_dispatch:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build_docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4
- name: Build docs
id: build_docs
run: cargo doc --features protoc --verbose --document-private-items
- name: Copy redirect file
run: cp index.html target/doc/
- name: Upload docs
id: upload_docs
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b with:
path: target/doc
deploy:
environment:
name: github-pages
url: ${{ steps.upload_docs.outputs.page_url }}
runs-on: ubuntu-latest
needs: build_docs
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128