@@ -137,3 +137,51 @@ jobs:
138 command: clippy
138 command: clippy
139 args: -- -D warnings
139 args: -- -D warnings
143+ runs-on: ubuntu-latest
145+ - name: Checkout sources
146+ uses: actions/checkout@v2
150+ - name: Install stable toolchain
151+ uses: actions-rs/toolchain@v1
157+ - name: Cache cargo registry
158+ uses: actions/cache@v2.1.6
160+ path: ~/.cargo/registry
161+ key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
163+ - name: Cache cargo index
164+ uses: actions/cache@v2.1.6
167+ key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
169+ - name: Cache cargo target dir
170+ uses: actions/cache@v2.1.6
173+ key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
175+ - name: Generate docs
176+ uses: actions-rs/cargo@v1
181+ - name: Check uncommitted documentation changes
184+ git diff-files --quiet \
185+ || (echo "Run 'cargo xtask docgen', commit the changes and push again" \