Skip to content

Commit 7cba832

Browse files
authored
Merge pull request #27 from spautz/github-actions
2 parents 31e2946 + a5722c5 commit 7cba832

File tree

2 files changed

+49
-17
lines changed

2 files changed

+49
-17
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
on: push
3+
jobs:
4+
build:
5+
name: Build & test
6+
runs-on: ubuntu-latest
7+
8+
strategy:
9+
matrix:
10+
node-version: [12.x, 14.x, 16.x, '*']
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
19+
- run: npm install --no-package-lock
20+
- run: npm test
21+
- run: npm run build-storybook --quiet
22+
23+
- uses: actions/upload-artifact@v2
24+
# Only publish examples using the master branch, and only from one build
25+
if: github.ref == 'refs/heads/master' && matrix.node-version == '16.x'
26+
with:
27+
name: examples
28+
path: examples/*
29+
if-no-files-found: error
30+
31+
publish:
32+
if: github.ref == 'refs/heads/master'
33+
name: Deploy storybook examples
34+
runs-on: ubuntu-latest
35+
needs: build
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
40+
- uses: actions/download-artifact@v2
41+
with:
42+
name: examples
43+
path: examples
44+
45+
- name: Deploy to gh-pages
46+
uses: JamesIves/[email protected]
47+
with:
48+
branch: gh-pages
49+
folder: examples

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)