Skip to content

Commit

Permalink
chore(justfile): add check to justfile docs preview commands (#9593)
Browse files Browse the repository at this point in the history
Co-authored-by: Phillip Cloud <[email protected]>
  • Loading branch information
gforsyth and cpcloud authored Jul 15, 2024
1 parent 122330a commit 4e411c7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,26 @@ docs-apigen *args:

# build documentation
docs-render:
#!/usr/bin/env bash
set -euo pipefail
# Check if the folder "reference" exists and has contents
if [ ! -d "docs/reference" ] || [ -z "$(ls -A docs/reference)" ]; then
just docs-apigen
fi

quarto render docs

# preview docs
docs-preview:
#!/usr/bin/env bash
set -euo pipefail
# Check if the folder "reference" exists and has contents
if [ ! -d "docs/reference" ] || [ -z "$(ls -A docs/reference)" ]; then
just docs-apigen
fi

quarto preview docs

# regen api and preview docs
Expand Down

0 comments on commit 4e411c7

Please sign in to comment.