Skip to content

Commit

Permalink
Merge pull request #27 from spautz/github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Jun 11, 2021
2 parents 31e2946 + a5722c5 commit 7cba832
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 17 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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@v2

- uses: actions/setup-node@v2
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@v2
# 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@v2

- uses: actions/download-artifact@v2
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
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

0 comments on commit 7cba832

Please sign in to comment.