Skip to content

test(Stepper): add visual test #6125

test(Stepper): add visual test

test(Stepper): add visual test #6125

Workflow file for this run

name: Storybook
on:
push:
branches:
- master
pull_request:
branches:
- "**"
env: # Set environment variables for every job and step in this workflow
CLICOLOR: "1" # Enable colors for *NIX commands
PY_COLORS: "1" # Enable colors for Python-based utilities
FORCE_COLOR: "1" # Force colors in the terminal
STREAMLINE_SECRET: ${{ secrets.STREAMLINE_SECRET }}
STREAMLINE_FAMILIES: ${{ secrets.STREAMLINE_FAMILIES }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node
uses: ./.github/actions/node
- name: Compile design tokens
run: yarn tokens build
- name: Build tailwind
run: yarn tailwind-preset build
- name: Build Storybook
run: yarn components build:storybook
# TODO: find an alternative to using "if" statements for so many steps
- name: Get BRANCH_URL
# do not run on master branch
if: github.ref != 'refs/heads/master'
env:
BRANCH_NAME: ${{ github.head_ref }}
run: echo "BRANCH_URL=$(sed -e 's/[^a-zA-Z0-9]/-/g' <<< ${BRANCH_NAME})" >> $GITHUB_ENV
- name: Get DOMAIN
if: github.ref != 'refs/heads/master'
run: echo "DOMAIN=https://orbit-mainframev-${BRANCH_URL}.surge.sh" >> $GITHUB_ENV
- name: Deploy to staging
if: github.ref != 'refs/heads/master'
# we're adding to the domain name the username of the current owner of SURGE_TOKEN
run: |
yarn components deploy:surge ${DOMAIN} --token ${{ secrets.SURGE_TOKEN }}
yarn components deploy:updateURL --pr=${PR_NUMBER} --lastUrl=${DOMAIN} --token=${{ secrets.OCTO_TOKEN }} --urlName=Storybook
env:
PR_NUMBER: ${{ github.event.number }}
- name: Deploy to production
# run on master branch
if: github.ref == 'refs/heads/master'
run: yarn components deploy:storybook --ci
env:
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}