Skip to content

Merge pull request #3897 from weiznich/feature/logging_for_cli #569

Merge pull request #3897 from weiznich/feature/logging_for_cli

Merge pull request #3897 from weiznich/feature/logging_for_cli #569

Workflow file for this run

on:
push:
branches:
- master
- '0.[0-9]+.x'
- '1.[0-9]+.x'
- '2.[0-9]+.x'
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@v3
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: cargo-doc-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Get the branch name
id: current_branch
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- uses: dtolnay/rust-toolchain@nightly
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libmysqlclient-dev libsqlite3-dev libpq-dev
- name: Build documentation
env:
RUSTFLAGS: "--cfg doc_cfg"
RUSTDOCFLAGS: "--cfg doc_cfg"
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/[email protected]
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