Skip to content

Commit f898b53

Browse files
committed
Set up Github Action for CI, based on existing workflows
1 parent 31e2946 commit f898b53

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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, v14.17, v16.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 build-storybook
22+
23+
- name: Deploy storybook
24+
if: github.ref == 'refs/heads/master' && matrix.node-version == 'v16.x'
25+
uses: JamesIves/[email protected]
26+
with:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
BRANCH: gh-pages
29+
FOLDER: examples
30+
CLEAN: true # Automatically remove deleted files from the deploy branch

0 commit comments

Comments
 (0)