From 9fec97d8f85b5aa041c438d164ea59226dda072c Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 5 Oct 2023 17:41:13 +0200 Subject: [PATCH] chore: move docs lint out of pre-commit --- .github/workflows/docs.yml | 23 +++++++++++++++++++++++ .pre-commit-config.yaml | 11 ----------- Makefile | 3 +++ requirements.txt | 1 + 4 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..a7fb63d5 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,23 @@ +name: Docs + +on: + push: + branches: [main, stable-1] + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: 3.x + + - name: Install dependencies + run: make venv + + - name: Run docs lint + run: make docs-lint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b7a6900..5efdb1f4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,17 +49,6 @@ repos: - id: antsibull-changelog-lint - id: antsibull-changelog-lint-changelog-yaml - - repo: local - hooks: - - id: antsibull-docs-lint-collection - name: antsibull-docs lint-collection - description: Lint the collection docs - language: python - entry: antsibull-docs lint-collection-docs --plugin-docs . - pass_filenames: false - additional_dependencies: - - antsibull-docs==2.3.1 - - repo: https://github.com/ansible/ansible-lint rev: v6.20.3 hooks: diff --git a/Makefile b/Makefile index 97c14f4f..3aa63cee 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ venv: lint: venv venv/bin/pylint plugins +docs-lint: + venv/bin/antsibull-docs lint-collection-docs --plugin-docs . + clean: git clean -xdf \ -e tests/integration/cloud-config-hcloud.ini diff --git a/requirements.txt b/requirements.txt index 7799fd69..d12b9f0d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,3 +9,4 @@ requests # Development requirements pylint +antsibull-docs>=2.5.0,<2.6