Skip to content

Add docs structure

Add docs structure #85

Workflow file for this run

# yamllint disable rule:line-length
---
name: Lint YAML files
on: # yamllint disable-line rule:truthy
pull_request:
branches: ['*']
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get changed files
uses: jitterbit/get-changed-files@v1
id: changed_files
with:
format: space-delimited
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install yamllint
run: |
python -m pip install --upgrade pip
pip install yamllint
- name: Lint YAML files
run: |-
IFS=' ' read -r -a files <<< "${{ steps.changed_files.outputs.all }}"
yaml_files=()
for file in "${files[@]}"; do
if [[ "$file" == *.yaml || "$file" == *.yml ]]; then
yaml_files+=("$file")
fi
done
if [ ${#yaml_files[@]} -gt 0 ]; then
echo -e "Running yamllint"
yamllint . || exit 1
else
echo -e "Skipping yamllint since no YAML files were changed."
fi