Run Prettier on CI
GitHub Actions
To apply autofix for Prettier from GitHub Actions, do the following:
-
Install the
autofix.ciGitHub App. -
Make sure you have a pinned version of Prettier installed in your repository.
-
Create
.github/workflows/prettier.ymlwith following content:.github/workflows/prettier.ymlname: autofix.cion:pull_request:push:permissions: {}jobs:prettier:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4- uses: actions/setup-node@v4- run: |yarnyarn prettier . --write- uses: autofix-ci/action@v1with:commit-message: "Apply Prettier format"
For more information see autofix.ci website.