From dd3925bee36be80281ea6bc0c0f29518282ad74f Mon Sep 17 00:00:00 2001 From: Jeremy Silver Date: Fri, 3 May 2024 18:20:48 -0400 Subject: [PATCH] build: use --check-only with build-docs hook (turns off automatic rebuilding) --- .pre-commit-config.yaml | 5 +++-- pyproject.toml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c850620..88f3055 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,10 +28,11 @@ repos: - id: commitizen stages: [commit-msg] - repo: https://github.com/jeremander/gadzooks - rev: v0.2.6 + rev: v0.2.7 hooks: - id: build-docs - args: ['--src-docs', 'docs', '--', 'mkdocs', 'build', '--strict', '--no-directory-urls', '-d', 'fancy_dataclass/docs'] + # args: ['--src-docs', 'docs', '--', 'mkdocs', 'build', '--strict', '--no-directory-urls', '-d', 'fancy_dataclass/docs'] + args: ['--src-docs', 'docs', '--check-only'] pass_filenames: false verbose: true - id: loc-summarize diff --git a/pyproject.toml b/pyproject.toml index 1a2cad8..4638c39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ dependencies = [ build = "mkdocs build --clean --strict --no-directory-urls {args}" # build docs within the package, if not already up-to-date build-pkg = "gadzooks build-docs --src-docs docs {args} -- mkdocs build --strict --no-directory-urls -d fancy_dataclass/docs" +check = "gadzooks build-docs --src-docs docs --check-only {args}" serve = "mkdocs serve" deploy = "mkdocs build --site-dir $READTHEDOCS_OUTPUT/html"