-
Notifications
You must be signed in to change notification settings - Fork 25
44 lines (41 loc) · 1005 Bytes
/
lint.yml
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
38
39
40
41
42
43
44
name: Lint
on:
workflow_dispatch:
pull_request:
paths:
- "**.md"
- ".github/workflows/**"
push:
branches:
- main
paths:
- "**.md"
- ".github/workflows/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prettier check
run: |
# if you encounter error, rerun the command below and commit the changes
make lint
git diff --exit-code
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
npm i -D postcss postcss-cli autoprefixer
hugo --minify