-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (44 loc) · 1.3 KB
/
build.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install node modules
uses: bahmutov/npm-install@v1
- name: Build
run: npm run build
- name: Lint
run: npm run lint -- --max-warnings=0
- name: Type check
run: npm run typeCheck
- name: Test
run: npm run test -- --coverage
- name: Build storybook
run: npm run build-storybook -- --quiet
- name: Upload pages artifacts
# https://github.com/actions/upload-pages-artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'storybook-static'
- name: Deploy GitHub Pages
if: github.ref == 'refs/heads/main'
# https://github.com/actions/deploy-pages
uses: actions/deploy-pages@v4