• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Continuous Integration - Docs
2
3on:
4  push:
5    branches:
6      - main
7    paths:
8      - "**.rs"
9      - "Cargo.toml"
10      - "Cargo.lock"
11  workflow_dispatch:
12
13jobs:
14  docs:
15    name: Generate crate documentation
16    runs-on: ubuntu-latest
17    steps:
18      - name: Checkout sources
19        uses: actions/checkout@v2
20
21      - name: Install Rust toolchain
22        uses: actions-rs/toolchain@v1
23        with:
24          profile: minimal
25          toolchain: nightly
26          override: true
27
28      - name: Generate documentation
29        uses: actions-rs/cargo@v1
30        env:
31          RUSTDOCFLAGS: "--enable-index-page -Zunstable-options"
32        with:
33          command: doc
34          args: --no-deps
35
36      - name: Deploy documentation
37        uses: peaceiris/actions-gh-pages@v3
38        with:
39          github_token: ${{ secrets.GITHUB_TOKEN }}
40          publish_dir: ./target/doc
41