docusaurus/.github/workflows/lint.yml

28 lines
694 B
YAML

name: Lint
on:
pull_request:
branches:
- main
jobs:
lint:
name: Lint
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: yarn
- name: Installation
run: yarn
# run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!)
- name: Check immutable yarn.lock
run: git diff --exit-code
- name: Lint
run: yarn lint:ci
- name: Prettier Code
run: yarn format:diff
- name: Prettier Docs
run: yarn format-docs:diff