From 61c9ad4a8b7f1e504d43896a58226aa7fad6b86b Mon Sep 17 00:00:00 2001 From: Fran Date: Mon, 4 Nov 2024 16:00:11 -0500 Subject: [PATCH] feature: Add prettier action --- .github/workflows/prettier.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/prettier.yml diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 0000000..ef01200 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,25 @@ +name: Format the code + +on: + push: + branches: + - main + +jobs: + format: + runs-on: ubuntu-latest + name: Format Files + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "16" + - name: Prettier + run: npx prettier --write **/*.tsx + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: stefanzweifel/git-auto-commit-action@v4 + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + with: + commit_message: "style: format files" -- 2.49.1