| 1 |
name: docs |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: |
| 5 |
push: |
| 6 |
branches: |
| 7 |
- "main" |
| 8 |
workflow_dispatch: |
| 9 |
|
| 10 |
jobs: |
| 11 |
build-deploy: |
| 12 |
runs-on: ubuntu-latest |
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v6 |
| 15 |
- uses: actions-rs/toolchain@v1 |
| 16 |
with: |
| 17 |
profile: minimal |
| 18 |
toolchain: stable |
| 19 |
override: true |
| 20 |
- uses: actions-rs/cargo@v1 |
| 21 |
with: |
| 22 |
command: doc |
| 23 |
args: --no-deps |
| 24 |
|
| 25 |
- name: Deploy |
| 26 |
uses: peaceiris/actions-gh-pages@v4 |
| 27 |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} |
| 28 |
with: |
| 29 |
github_token: ${{ secrets.GITHUB_TOKEN }} |
| 30 |
publish_dir: ./target/doc |
| 31 |
keep_files: false |
| 32 |
destination_dir: docs |