Skip to content

Commit

Permalink
chore(ci): add vale (#2200)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah authored May 4, 2021
1 parent 562660a commit 02635bd
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
Empty file added .github/styles/.gitkeep
Empty file.
23 changes: 23 additions & 0 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint Docs

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
list-docs:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Vale
uses: errata-ai/vale-action@master
with:
styles: https://vale-library.netlify.app/styles.zip
files: '["docs", "src", "README.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md"]'
onlyAnnotateModifiedLines: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ oclif.manifest.json

tests/hugo-site/resources
tests/hugo-site/out

.github/styles
5 changes: 5 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
StylesPath = ./.github/styles
MinAlertLevel = suggestion

[*.md]
BasedOnStyles = base, netlify-terms, smart-marks
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ We also test for a few other things:
- Test coverage
- Must work with Windows + Unix environments.

### Lint docs per Netlify style guide

1. [Install vale](https://docs.errata.ai/vale/install)
2. Download the latest styles to the styles directory. For example: `wget -q -O styles.zip https://vale-library.netlify.app/styles.zip && unzip styles.zip -d .github/styles && rm styles.zip`
3. Run vale: `vale docs src README.md CODE_OF_CONDUCT.md CONTRIBUTING.md`

## Pull Requests

We actively welcome your pull requests.
Expand Down

1 comment on commit 02635bd

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Package size: 386 MB

Please sign in to comment.