-
Notifications
You must be signed in to change notification settings - Fork 32
49 lines (40 loc) · 1.13 KB
/
ci.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
name: CI
on: push
jobs:
build:
name: Build & test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install --no-package-lock
- run: npm test
- run: npm run build-storybook --quiet
- uses: actions/upload-artifact@4
# Only publish examples using the master branch, and only from one build
if: github.ref == 'refs/heads/master' && matrix.node-version == '16.x'
with:
name: examples
path: examples/*
if-no-files-found: error
publish:
if: github.ref == 'refs/heads/master'
name: Deploy storybook examples
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: examples
path: examples
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: examples