name: Prettier
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Setup Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Install dependencies
shell: bash
run: |
npm ci --ignore-scripts
- name: Run Prettier
shell: bash
run: |
npx --no-install prettier --check .