Merge pull request #117 from oschwald/greg/harden-reader #50
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: Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| doc-check: | |
| name: Rustdoc | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v7 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build documentation with warnings denied | |
| run: cargo doc --all --features mmap,simdutf8 --no-deps | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| deploy: | |
| name: GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: doc-check | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v7 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build Documentation | |
| run: cargo doc --all --features mmap,simdutf8 --no-deps | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| - name: Create index | |
| run: echo '<meta http-equiv=refresh content=0;url=maxminddb/index.html>' > target/doc/index.html | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./target/doc |