File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+
4+ echo " Running mkdocs build..."
5+
6+ TEMP_SITE_DIR=$( mktemp -d)
7+
8+ # Run mkdocs build into temp dir
9+ if mkdocs build --site-dir " $TEMP_SITE_DIR " --strict; then
10+ echo " Build successful."
11+ else
12+ echo " Build failed." >&2
13+ exit 1
14+ fi
15+
16+ # Cleanup
17+ rm -rf " $TEMP_SITE_DIR "
Original file line number Diff line number Diff line change 1+ repos :
2+ - repo : https://github.com/astral-sh/ruff-pre-commit
3+ rev : v0.11.12
4+ hooks :
5+ - id : ruff
6+ name : " Ruff linter"
7+ args : [ netbox_branching/ ]
8+ - repo : local
9+ hooks :
10+ - id : mkdocs-build
11+ name : " Build documentation"
12+ description : " Build the documentation with mkdocs"
13+ files : ' docs/'
14+ entry : .hooks/mkdocs-build.sh
15+ language : system
16+ pass_filenames : false
You can’t perform that action at this time.
0 commit comments