Skip to content

Commit 1c330f4

Browse files
committed
chore(gh-actions): add style-lint on CI
1 parent b6a1a41 commit 1c330f4

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/style-lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Style Lint'
2+
3+
on:
4+
push:
5+
paths:
6+
- '_sass/**.scss'
7+
pull_request:
8+
paths:
9+
- '_sass/**.scss'
10+
11+
jobs:
12+
stylelint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v3
21+
- run: npm i
22+
- run: npm test

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
"url": "https://github.com/cotes2020/jekyll-theme-chirpy/issues"
1313
},
1414
"homepage": "https://github.com/cotes2020/jekyll-theme-chirpy#readme",
15+
"scripts": {
16+
"test": "npx stylelint _sass/**/*.scss",
17+
"fixlint": "npx stylelint _sass/**/*.scss --fix"
18+
},
1519
"devDependencies": {
1620
"gulp": "^4.0.2",
1721
"gulp-concat": "^2.6.1",

0 commit comments

Comments
 (0)