forked from dasrick/go-teams-notify
-
Notifications
You must be signed in to change notification settings - Fork 16
50 lines (43 loc) · 1.57 KB
/
lint-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 2021 Adam Chalkley
#
# https://github.com/atc0005/go-teams-notify
#
# Licensed under the MIT License. See LICENSE file in the project root for
# full license information.
name: Validate Docs
# Run Workflow for Pull Requests (new, updated)
# `synchronized` seems to equate to pushing new commits to a linked branch
# (whether force-pushed or not)
on:
pull_request:
types: [opened, synchronize]
jobs:
lint_markdown:
name: Lint Markdown files
runs-on: "ubuntu-latest"
# Default: 360 minutes
timeout-minutes: 10
steps:
- name: Setup Node
# https://github.com/actions/setup-node#supported-version-syntax
# https://github.com/nvm-sh/nvm#long-term-support
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install Markdown linting tools
run: |
npm install markdownlint --save-dev
npm install -g markdownlint-cli
echo "markdownlint version: $(markdownlint --version)"
- name: Check out code
uses: actions/checkout@v3
- name: Run Markdown linting tools
# The `.markdownlint.yml` file specifies config settings for this
# linter, including which linting rules to ignore.
#
# Note: Explicitly ignoring top-level vendor folder; we do not want
# potential linting issues in bundled documentation to fail linting CI
# runs for *our* documentation
run: |
echo "markdownlint version: $(markdownlint --version)"
markdownlint '**/*.md' --ignore node_modules --ignore vendor