Skip to content

Commit b729e99

Browse files
committed
Add prettier to github actions
1 parent 2a1ba02 commit b729e99

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
name: Fix PHP code style issues
1+
name: Fix code style issues
22

33
on:
44
push:
5-
paths:
6-
- '**.php'
75

86
permissions:
97
contents: write
108

119
jobs:
12-
fix-php-code-styling:
10+
fix-code-styling:
1311
runs-on: ubuntu-latest
1412
if: github.repository_owner == 'statamic'
1513

@@ -25,6 +23,15 @@ jobs:
2523
with:
2624
pintVersion: 1.16.0
2725

26+
- name: Use Node.js
27+
uses: actions/setup-node@v4
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Fix formatting with Prettier
33+
run: npm run prettier:format
34+
2835
- name: Commit changes
2936
uses: stefanzweifel/git-auto-commit-action@v5
3037
with:
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
name: Lint PHP code style issues
1+
name: Lint code style issues
22

33
on:
44
pull_request:
5-
paths:
6-
- '**.php'
75

86
jobs:
9-
lint-php-code-styling:
7+
lint-code-styling:
108
runs-on: ubuntu-latest
119

1210
steps:
@@ -19,3 +17,12 @@ jobs:
1917
testMode: true
2018
verboseMode: true
2119
pintVersion: 1.16.0
20+
21+
- name: Use Node.js
22+
uses: actions/setup-node@v4
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Check formatting with Prettier
28+
run: npm run prettier:check

0 commit comments

Comments
 (0)