Prettier #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Prettify Code | ||
| on: [push, pull_request] | ||
| jobs: | ||
| format: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 18 | ||
| - run: npx prettier --write . | ||
| - run: git diff --exit-code || (git config --global user.name "github-actions" && git config --global user.email "actions@github.com" && git commit -am "chore: auto-format code" && git push) | ||