Add css linter step

This commit is contained in:
Gabe Kangas 2024-07-11 10:25:47 -07:00
parent df2f548de8
commit a2aa5d4ab5
2 changed files with 41 additions and 1 deletions

40
.github/workflows/css-lint.yaml vendored Normal file
View File

@ -0,0 +1,40 @@
name: CSS Lint and Formatting
on:
push:
paths:
- 'web/**'
pull_request:
paths:
- 'web/**'
jobs:
css_lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get changed files
id: changed-files-yaml
uses: tj-actions/changed-files@v44
with:
path: 'web'
files_yaml: |
src:
- '**/*.{css,scss}'
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Run Prettier
run: npx prettier --check "web/**/*.{js,jsx,ts,tsx,css,scss}"
- name: Run Stylelint
run: npx stylelint "web/**/*.{css,scss}"

View File

@ -47,7 +47,7 @@ jobs:
web/next.config.js
files_yaml: |
src:
- '**/*.{js,ts,tsx,jsx,css,md}'
- '**/*.{js,ts,tsx,jsx,md}'
- name: Cache node modules
uses: actions/cache@v4