Skip to content

add rustdocs to CI and publish to github pages #7

add rustdocs to CI and publish to github pages

add rustdocs to CI and publish to github pages #7

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
env:
CARGO_TERM_COLOR: always
SQLX_OFFLINE: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Check
run: cargo clippy --no-deps
- name: Build
run: cargo build --verbose --release
- name: Test
run: cargo test --verbose
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: pages
uses: actions/configure-pages@v3
- run: cargo doc --no-deps --all-features
- uses: actions/upload-artifact@v2
with:
path: target/doc
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: docs
steps:
- uses: actions/deploy-pages@v2