-
Notifications
You must be signed in to change notification settings - Fork 108
48 lines (44 loc) · 1.11 KB
/
ci.yaml
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
45
46
47
48
name: CI
on: [pull_request, push]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install tools
run: npm install
- name: Lint code
run: npm run lint
- name: Format code
run: |
npm run format
git diff --exit-code
- name: Build code
run: |
rm -r _site
npm run build
git diff \
--exit-code \
':(exclude)_site/news_feed.atom'
git diff \
--exit-code \
-I '<updated>.*</updated>' \
_site/news_feed.atom
- name: Check html
run: |
npm run check-html
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: website
path: _site