Merge branch 'aa-development/recruitment' into aa-staging/recruitment #966
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name of our action | |
name: 'Chromatic' | |
# The event that will trigger the action | |
on: | |
push: | |
paths: | |
- 'packages/UI/.storybook/**' | |
- 'packages/UI/src/**' | |
defaults: | |
run: | |
working-directory: packages/UI | |
# What the action will do | |
jobs: | |
deploy: | |
# The operating system it will run on | |
runs-on: ubuntu-latest | |
outputs: | |
url: ${{ steps.chromatic.outputs.url }} | |
buildUrl: ${{ steps.chromatic.outputs.buildUrl }} | |
storybookUrl: ${{ steps.chromatic.outputs.storybookUrl }} | |
code: ${{ steps.chromatic.outputs.code }} | |
branch: ${{ steps.extract_branch.outputs.branch }} | |
# The list of steps that the action will go through | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT | |
id: extract_branch | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: yarn | |
- name: install deps | |
run: corepack enable && yarn | |
- name: generate css | |
run: yarn workspace @devlaunchers/tailwind build-tw | |
#👇 Adds Chromatic as a step in the workflow | |
- name: Chromatic | |
uses: chromaui/action@v1 | |
id: chromatic | |
# Options required for Chromatic's GitHub Action | |
with: | |
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/design-systems-for-developers/react/en/review/ to obtain it | |
workingDir: packages/UI | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
onlyChanged: true | |
# - name: Run Storybook tests | |
# run: yarn test-storybook | |
# env: | |
# TARGET_URL: ${{ steps.chromatic.outputs.storybookUrl }} |