Skip to content

Merge pull request #316 from ModProg/update-attribute-derive #548

Merge pull request #316 from ModProg/update-attribute-derive

Merge pull request #316 from ModProg/update-attribute-derive #548

Workflow file for this run

name: Docs
on: [push]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: hecrj/setup-rust-action@v1
- name: Generate Docs
run: |
cargo doc --no-deps --all-features
- name: Deploy
uses: khonsulabs/sync-to-dossier@main
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/')
with:
url: ${{ secrets.DOSSIER_URL }}
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }}
api-key: ${{ secrets.DOSSIER_API_KEY }}
project: bonsaidb
from: target/doc/
to: /${{ github.ref_name }}/docs
book:
runs-on: ubuntu-latest
# The book links to docs. When publishing new documentation changes that
# break links, if we don't have this `needs` here, the link checker will be
# checking outdated links.
needs: docs
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/mdbook
~/.cargo/bin/mdbook-linkcheck
~/.cargo/bin/mdbook-mermaid
~/.cargo/bin/mdbook-variables
key: mdbook
- name: Install mdbook
run: |
command -v mdbook || cargo install mdbook --no-default-features --features search
command -v mdbook-linkcheck || cargo install mdbook-linkcheck
command -v mdbook-mermaid || cargo install mdbook-mermaid
command -v mdbook-variables || cargo install mdbook-variables --locked
- name: Generate book
run: cd book && mdbook build
- name: Deploy
uses: khonsulabs/sync-to-dossier@main
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/')
with:
url: ${{ secrets.DOSSIER_URL }}
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }}
api-key: ${{ secrets.DOSSIER_API_KEY }}
project: bonsaidb
from: book/book/html/
to: /${{ github.ref_name }}/guide