Skip to content

ops: update package.json #75

ops: update package.json

ops: update package.json #75

Workflow file for this run

name: Build and Deploy
# Controls when the action will run.
on:
# Triggers the workflow on push events for the master branch
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-deploy:
if: "!startsWith(github.event.head_commit.message, 'WIP') && !startsWith(github.event.head_commit.message, 'chore(release)')"
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Runs a single command using the runners shell
- name: Use node.js
uses: actions/setup-node@v4
with:
node-version: "20.15.0"
# Runs a set of commands using the runners shell
- name: Install packages
run: |
yarn
# Build library
- name: Build library
run: |
yarn dist
# Collect test coverage
- name: Run coverage
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.COVERAGE_TOKEN }}
with:
coverageCommand: yarn test --coverage --json --outputFile=./.storybook/jest-test-results.json
# Runs a set of commands using the runners shell
- name: Build storybook
run: |
yarn build
# Push build folder to gh-pages
- name: Deploy to GitHub Pages
# You may pin to the exact commit or the version.
# uses: JamesIves/github-pages-deploy-action@5dc1d5a192aeb5ab5b7d5a77b7d36aea4a7f5c92
uses: JamesIves/github-pages-deploy-action@v4.6.4
with:
branch: gh-pages
folder: build