Skip to content

Bordered Buttons

Bordered Buttons #1655

Workflow file for this run

name: "Build Storybook"
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
issues: write
pull-requests: write
jobs:
build-storybook:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Build Storybook
run: yarn build-storybook
env:
NODE_OPTIONS: "--max_old_space_size=6144"
- name: Upload Storybook Static
uses: actions/upload-artifact@v4
with:
name: storybook-build
path: ./storybook-static
retention-days: 1
- name: Save branch metadata for Chromatic
run: |
mkdir METADATA
echo $BRANCH_NAME > ./METADATA/branch-name
echo $DRAFT > ./METADATA/draft
echo $BASE > ./METADATA/base
echo $RUN_CHROMATIC > ./METADATA/run-chromatic
echo $NO_TURBOSNAP > ./METADATA/no-turbosnap
env:
DRAFT: ${{ github.event.pull_request.draft }}
BRANCH_NAME: ${{ github.event.pull_request.head.label || github.ref_name }}
BASE: ${{ github.event.pull_request.base.ref || github.ref_name }}
RUN_CHROMATIC: ${{ contains(github.event.pull_request.labels.*.name, 'chromatic') }}
NO_TURBOSNAP: ${{ contains(github.event.pull_request.labels.*.name, 'no turbosnap') }}
- uses: actions/upload-artifact@v4
with:
name: metadata
path: ./METADATA
retention-days: 1
- name: Remove Chromatic label
uses: actions/github-script@v7
if: contains(github.event.pull_request.labels.*.name, 'chromatic')
with:
script: |
await github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ["chromatic"]
});