Skip to content

Commit e0ee182

Browse files
committed
chore: add github Action support for StyleLint
1 parent db55980 commit e0ee182

3 files changed

Lines changed: 52 additions & 6 deletions

File tree

.github/workflows/eslint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
eslint:
10-
name: Run eslint scanning
10+
name: Run ESLint Scan
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: read
@@ -27,4 +27,4 @@ jobs:
2727
run: yarn install
2828

2929
- name: Run ESLint
30-
run: yarn lint
30+
run: yarn eslint

.github/workflows/nextjs.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ concurrency:
2727
jobs:
2828
# Build job
2929
build:
30+
name: Run Next.js Build
3031
runs-on: ubuntu-latest
3132
steps:
3233
- name: Checkout
@@ -58,7 +59,7 @@ jobs:
5859
with:
5960
path: ./out
6061
eslint:
61-
name: Run eslint scanning
62+
name: Run ESLint Scan
6263
runs-on: ubuntu-latest
6364
steps:
6465
- name: Checkout code
@@ -71,9 +72,24 @@ jobs:
7172
- name: Install dependencies
7273
run: yarn install
7374
- name: Run ESLint
74-
run: yarn lint
75+
run: yarn eslint
76+
stylelint:
77+
name: Run StyleLint Scan
78+
runs-on: ubuntu-latest
79+
steps:
80+
- name: Checkout code
81+
uses: actions/checkout@v4
82+
- name: Setup Node
83+
uses: actions/setup-node@v4
84+
with:
85+
node-version: '24'
86+
cache: yarn
87+
- name: Install dependencies
88+
run: yarn install
89+
- name: Run StyleLint
90+
run: yarn stylelint '**/*.css'
7591
typescript:
76-
name: Run TypeScript building
92+
name: Run TypeScript Build
7793
runs-on: ubuntu-latest
7894
steps:
7995
- name: Checkout code
@@ -109,7 +125,7 @@ jobs:
109125
name: github-pages
110126
url: ${{ steps.deployment.outputs.page_url }}
111127
runs-on: ubuntu-latest
112-
needs: [eslint, typescript, jest, build]
128+
needs: [eslint, stylelint, typescript, jest, build]
113129
steps:
114130
- name: Deploy to GitHub Pages
115131
id: deployment

.github/workflows/stylelint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: StyleLint
2+
3+
on:
4+
pull_request:
5+
# The branches below must be a subset of the branches above
6+
branches: ['master']
7+
8+
jobs:
9+
eslint:
10+
name: Run StyleLint Scan
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
security-events: write
15+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '24'
24+
cache: yarn
25+
26+
- name: Install dependencies
27+
run: yarn install
28+
29+
- name: Run StyleLint
30+
run: yarn stylelint '**/*.css'

0 commit comments

Comments
 (0)