Skip to content

1.5.1

1.5.1 #1496

Workflow file for this run

name: Test
on: push
env:
PROJECT_URL: storybook.aboutbits.it
jobs:
setup:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
checks:
runs-on: ubuntu-20.04
needs: [setup]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run lint
- run: npm run typecheck
test:
runs-on: ubuntu-20.04
needs: [setup]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run test
deploy:
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/main'
needs:
- test
- checks
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- name: Build
run: npm run build-storybook
- name: Add CNAME file
run: echo ${{ env.PROJECT_URL }} > storybook-static/CNAME
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: storybook-static
clean: true