2022-09-06 19:55:01 +00:00
|
|
|
name: Run prettier
|
2022-08-27 17:31:45 +00:00
|
|
|
|
|
|
|
on:
|
2022-09-30 19:09:21 +00:00
|
|
|
push:
|
2022-08-27 17:31:45 +00:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
prettier:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-09-30 19:09:21 +00:00
|
|
|
- name: Check out repo
|
2022-09-06 19:55:01 +00:00
|
|
|
uses: actions/checkout@v2
|
2022-09-30 19:09:21 +00:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
name: Configure npm caching
|
2022-09-06 19:55:01 +00:00
|
|
|
with:
|
2022-09-30 19:09:21 +00:00
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-npm-
|
|
|
|
- name: Run prettier
|
|
|
|
run: |-
|
|
|
|
npx prettier --check '_data/*/*.json'
|