chore: add workflow to publish crate docs to gh pages #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build docs and publish to github pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| - chore/docs | |
| jobs: | |
| docker: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Generate Docs | |
| run: | | |
| cargo docs --workspace --no-deps | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'target/doc/' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |