diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml new file mode 100644 index 0000000..3a5b737 --- /dev/null +++ b/.github/linters/.yaml-lint.yml @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +--- +# https://yamllint.readthedocs.io/en/stable/ +extends: default + +rules: + colons: disable + document-start: disable + line-length: disable + truthy: false diff --git a/.github/workflows/build-pelican.yml b/.github/workflows/build-pelican.yml index 0567c10..21bf153 100644 --- a/.github/workflows/build-pelican.yml +++ b/.github/workflows/build-pelican.yml @@ -4,7 +4,7 @@ on: # This prevents the workflow from running automatically on a new branch # When creating a new site branch, please ensure that the push and checkout branches agree # and that the action/pelican destination value is updated accordingly - branches: [ 'main' ] + branches: ['main'] paths: - 'content/**' - 'pelicanconf.py' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca7e532..b143d18 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,3 +35,12 @@ repos: - id: trailing-whitespace args: [--markdown-linebreak-ext=md] exclude: \.svg$ + - repo: https://github.com/adrienverge/yamllint + rev: v1.37.1 + hooks: + - id: yamllint + name: run yamllint + description: check YAML files with yamllint + args: [--strict, -c=.github/linters/.yaml-lint.yml] + types: [yaml] + files: \.ya?ml$