Skip to content

Commit

Permalink
GitHub Action to re-format code on the main branch with prettier (htt…
Browse files Browse the repository at this point in the history
  • Loading branch information
AjaiKN committed Sep 4, 2023
1 parent 60bea2e commit d120e6d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -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)."

0 comments on commit d120e6d

Please sign in to comment.