diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 0000000..5c5414c --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,27 @@ +name: Prettier Check on Merge + +on: + pull_request: + push: + branches: + - main + +jobs: + prettier: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + # Make sure the actual branch is checked out when running on pull requests + ref: ${{ github.head_ref }} + + - name: Prettify code + uses: creyD/prettier_action@v4.3 + with: + # Specify which files or directories to format + prettier_options: --write './packages/core/**/*' './packages/cli/**/*' + + # Optionally set the working directory if needed + # working_directory: ./ # Uncomment and adjust if your setup requires a specific directory