Check prettier style in a github action

This commit is contained in:
cmdr2 2023-04-28 16:42:38 +05:30
parent d18cefc519
commit 9af511e457

22
.github/workflows/prettier.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Check JavaScript for conformance with Prettier
on:
push:
pull_request:
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- uses: actions/cache@v2
name: Configure npm caching
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Run prettier
run: |-
npx prettier --check "./**/*.js" ui