Skip to content

docs: update CustomTheming with correct example #2475

docs: update CustomTheming with correct example

docs: update CustomTheming with correct example #2475

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
branches:
- master
- develop
- "release/**"
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v2
with:
node-version: v16.17.1
cache: yarn
- name: node_modules cache
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-modules-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-node-modules-cache-
- name: install dependencies
run: yarn install --immutable
- name: lint
run: yarn lint
- name: type check
run: yarn typecheck
- name: unit test
run: yarn test
- name: output change conditionals
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
deploy:
- './packages/odyssey-react/**'
- './packages/odyssey-react-mui/**'
- './packages/odyssey-storybook/**'
vrt:
- './packages/odyssey-react/src/**'
- './packages/odyssey-react-mui/src/**'
- './packages/odyssey-storybook/**'
- name: setup AWS
if: steps.changes.outputs.deploy == 'true'
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: set $SHA7
if: steps.changes.outputs.deploy == 'true'
run: echo "SHA7=$(git rev-parse --short ${{ github.event.pull_request.head.sha || github.sha }})" >> $GITHUB_ENV
- name: set $URL_STORYBOOK
if: steps.changes.outputs.deploy == 'true'
run: echo "URL_STORYBOOK="https://${SHA7}.ods.dev"" >> $GITHUB_ENV
- name: set $COMMIT_MSG
if: steps.changes.outputs.deploy == 'true'
run: echo "COMMIT_MSG=${{ github.event.head_commit.message || github.event.pull_request.title }}" >> $GITHUB_ENV
- name: build storybook
if: steps.changes.outputs.deploy == 'true'
run: cd ./packages/odyssey-storybook && rm -rf ./node_modules/.cache && yarn build
- name: create deployment
if: steps.changes.outputs.deploy == 'true'
uses: bobheadxi/[email protected]
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: preview
- name: deploy
if: steps.changes.outputs.deploy == 'true'
run: aws s3 sync ./packages/odyssey-storybook/dist/ s3://ods.dev/$SHA7 --delete
- name: "inform slack of deployment (#odyssey-deployments)"
if: steps.changes.outputs.deploy == 'true'
run: bash ./scripts/notify-slack.sh
env:
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
AUTHOR_NAME: ${{github.actor}}
BRANCH_NAME: ${{github.head_ref}}
PULL_REQUEST_ID: ${{github.event.pull_request.number}}
- name: update deployment status
if: steps.changes.outputs.deploy == 'true'
uses: bobheadxi/[email protected]
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: ${{ env.URL_STORYBOOK }}
- name: a11y test
if: steps.changes.outputs.deploy == 'true'
run: yarn workspace @okta/odyssey-storybook test:storybook --url ${{ env.URL_STORYBOOK }}
- name: visual regression test
if: steps.changes.outputs.vrt == 'true'
env:
APPLITOOLS_API_KEY: ${{ secrets.OKTA_474937 }}
APPLITOOLS_BATCH_ID: ${{ github.event.pull_request.head.sha }}
run: yarn workspace @okta/odyssey-storybook eyes-storybook -u ${{ env.URL_STORYBOOK }}