diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 00000000000..12837b241e7 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,26 @@ +name: Check Code with Prettier + +on: + push: + branches: + - "master" + +jobs: + + format: + + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@v2 + - name: Run prettier + run: |- + npx prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v2.3.0 + with: + commit_message: Apply Prettier changes + branch: master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}