Skip to content

Commit

Permalink
Fix Markdown files with Prettier and check in CI (mastodon#21972)
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni authored Feb 20, 2023
1 parent 717683d commit a9472f8
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 24 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Markdown Linting
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- '.github/workflows/lint-md.yml'
- '.prettier*'
- '**/*.md'
- '!AUTHORS.md'
- 'package.json'
- 'yarn.lock'

pull_request:
paths:
- '.github/workflows/lint-md.yml'
- '.prettier*'
- '**/*.md'
- '!AUTHORS.md'
- 'package.json'
- 'yarn.lock'

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache: yarn

- name: Install all yarn packages
run: yarn --frozen-lockfile

- name: Prettier
run: yarn prettier --check "**/*.md"
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ app/javascript/styles/mastodon/reset.scss
# Ignore Javascript pending https://github.com/mastodon/mastodon/pull/23631
*.js

# Ignore Markdownlint pending https://github.com/mastodon/mastodon/pull/21972
*.md

# Ignore HTML till cleaned and included in CI
*.html

# Ignore the generated AUTHORS.md
AUTHORS.md
Loading

0 comments on commit a9472f8

Please sign in to comment.