Skip to content

Merge pull request #4887 from LucaCappelletti94/sqlite-flag #997

Merge pull request #4887 from LucaCappelletti94/sqlite-flag

Merge pull request #4887 from LucaCappelletti94/sqlite-flag #997

Workflow file for this run

on:
push:
branches:
- main
- "0.[0-9]+.x"
- "1.[0-9]+.x"
- "2.[0-9]+.x"
permissions:
contents: "write"
pages: "write"
name: Publish Docs
jobs:
publish_docs:
if: github.repository == 'diesel-rs/diesel'
name: Publish Docs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v5
- name: Cache cargo registry
uses: Swatinem/rust-cache@v2
with:
key: cargo-doc-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Get the branch name
id: current_branch
shell: bash
run: |
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
- uses: dtolnay/rust-toolchain@nightly
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libmysqlclient-dev libsqlite3-dev libpq-dev libtirpc-dev
- name: Build documentation
env:
RUSTFLAGS: "--cfg diesel_docsrs"
RUSTDOCFLAGS: "--cfg diesel_docsrs -Z unstable-options --generate-link-to-definition --generate-macro-expansion"
run: cargo +nightly doc --manifest-path diesel/Cargo.toml --features "postgres sqlite mysql extras i-implement-a-third-party-backend-and-opt-into-breaking-changes" --workspace
- name: Publish documentation
if: success()
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: target/doc # The folder the action should deploy.
# Store documentation for each branch in a different folder
# This allows us to differentiate between docs for master
# and docs for already released versions
target-folder: ${{ steps.current_branch.outputs.branch }}
single-commit: true