#!/bin/sh
# arming: ci Documentation workflow and pre-commit docs-links hook
set -eu
cd "$(dirname "$0")/.."
site=$(mktemp -d)
trap 'rm -rf "$site"' EXIT HUP INT TERM
# Match Pages' /tambo/ base, including the generated 404 page's root link.
mdbook build docs/book --dest-dir "$site/tambo"
scripts/check-doc-links.sh --root-dir "$site" README.md "$site/tambo/**/*.html"
