add doc release-notes #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint | |
on: | |
pull_request: | |
jobs: | |
lint-docs: | |
name: Lint Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
# Assume PRs are less than 20 commits | |
fetch-depth: 20 | |
- name: Get all changed markdown files | |
id: changed-markdown-files | |
uses: tj-actions/changed-files@v40 | |
with: | |
since_last_remote_commit: false | |
files: | | |
**.md | |
- name: Setup node | |
if: steps.changed-markdown-files.outputs.any_changed == 'true' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install node deps | |
if: steps.changed-markdown-files.outputs.any_changed == 'true' | |
run: | | |
yarn install --immutable | |
- name: Lint with markdownlint | |
if: steps.changed-markdown-files.outputs.any_changed == 'true' | |
run: | | |
npx markdownlint-cli2 ${{ steps.changed-markdown-files.outputs.all_changed_files }} | |
- name: Lint with zhlint | |
if: steps.changed-markdown-files.outputs.any_changed == 'true' | |
run: | | |
npm run config:zhlint | |
for file in ${{ steps.changed-markdown-files.outputs.all_changed_files }}; do | |
npx zhlint $file | |
done | |
- name: Lint with autocorrect | |
if: steps.changed-markdown-files.outputs.any_changed == 'true' | |
run: | | |
npm run lint:autocorrect ${{ steps.changed-markdown-files.outputs.all_changed_files }} |