Skip to content

feat: make fluid sizing for switch work as expected in figma #73

feat: make fluid sizing for switch work as expected in figma

feat: make fluid sizing for switch work as expected in figma #73

name: Deploy Storybook Preview
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_STORYBOOK }}
on:
workflow_dispatch:
pull_request:
types: [ready_for_review]
jobs:
Deploy-Preview:
if: ${{ github.event_name == 'workflow_dispatch' || contains( github.event.pull_request.labels.*.name, '📔 storybook') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use node 20 and yarn cache
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Install Vercel CLI
run: yarn add vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- id: deploy
name: Deploy Project Artifacts to Vercel
run: echo "url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT
- uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: open
- run: echo "Your PR is ${PR}"
if: success() && steps.findPr.outputs.number
- name: Create comment with the vercel preview deployment
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ steps.findPr.outputs.pr }}
body: Storybook preview deployment is available at ${{ steps.deploy.outputs.url }}
reactions: rocket, eyes