-
Notifications
You must be signed in to change notification settings - Fork 405
37 lines (34 loc) · 910 Bytes
/
prettier.yml
File metadata and controls
37 lines (34 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Prettier Action
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
if: github.event_name == 'push'
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Prettify code
if: github.event_name == 'push'
uses: creyD/prettier_action@v4.6
with:
prettier_options: --write **/*.{mjs,mts,css,vue,md}
- name: Prettify code dry run
if: github.event_name == 'pull_request'
uses: creyD/prettier_action@v4.6
with:
prettier_options: --write **/*.{mjs,mts,css,vue,md}
only_changed: true
dry: true