diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..20f2eff --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,28 @@ +name: Continuous Integration + +# This action works only on pushes to the main branch +on: + push: + branches: + - main + # for testing + - prettier-github-action-3 + +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: + # This part is also where you can pass other options, for example: + prettier_options: "--write ." + commit_message: "Format code with prettier (https://prettier.io/)" + commit_description: "This commit was automatically generated by a GitHub Action (see .github/workflows/format.yml)."