Skip to content

Commit db812ca

Browse files
Create prettier-format.yml
1 parent 121ed21 commit db812ca

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Prettier Format
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
prettier:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Install Prettier
21+
run: npm install -g prettier
22+
23+
- name: Run Prettier
24+
run: prettier --write "**/*.{md,json,yml,yaml}"
25+
26+
- name: Commit changes
27+
uses: stefanzweifel/git-auto-commit-action@v5
28+
with:
29+
commit_message: "Prettier auto-format"

0 commit comments

Comments
 (0)