Skip to content

Commit

Permalink
ci: prettier check workflow (#90)
Browse files Browse the repository at this point in the history
* ci: prettier check workflow

* refactor(ci): switch to manual npx call

* chore: add yml to validate-docs formatter
  • Loading branch information
hougesen authored Dec 29, 2023
1 parent c4dbec7 commit 90c3ed0
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/validate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: validate-docs

on:
push:
paths:
- '**/*.md'
- '**/*.json'
- '**/*.yml'
- '**/*.yaml'
- 'docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
prettier:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [20]

steps:
- name: Checkout 🛎
uses: actions/checkout@master

- name: Setup node env 🏗
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true

- name: Cache node_modules 📦
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run format 💎
run: npx prettier --check --cache .

0 comments on commit 90c3ed0

Please sign in to comment.