Zernit/.github/workflows.krey/markdown.yml
2020-02-17 23:46:21 +00:00

23 lines
761 B
YAML

name: Markdown
# Relevant to events - https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows
on:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
paths:
- '**.md'
jobs:
# Linting
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Installing dependencies..
run: if ! command -v markdownlint; then sudo npm install -g markdownlint-cli; fi
- name: Linting..
run: |
cd "$GITHUB_WORKSPACE" && for file in $(git ls-tree --name-only -r ${{ github.sha }} | grep '\.md$'); do
printf 'linting markdown file %s' "$file"
markdownlint "$file" --ignore node_modules
done