Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

CI

CI #1

name: CI
on:
workflow_dispatch:
branches: [main, releases]
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install --frozen-lockfile
npm run lint:ts && npm run build --if-present
env:
CI: true
publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 14.x
cache: "npm"
- run: npm install
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
args: deploy --dir=storybook-static --prod
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}