Skip to content

Merge pull request #820 from WPMedia/dependabot/npm_and_yarn/typescri… #809

Merge pull request #820 from WPMedia/dependabot/npm_and_yarn/typescri…

Merge pull request #820 from WPMedia/dependabot/npm_and_yarn/typescri… #809

name: Deploy storybook
# Event for the workflow
on:
push:
branches-ignore:
- "dependabot/**"
jobs:
chromatic_publish_validate:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.THEMES_OPS_SLACK_WEBHOOK_URL }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
registry-url: "https://npm.pkg.github.com"
- name: Cache Node Modules
id: cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Clean install (CI) dependencies if lockfile (above) changed
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish storybook
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- name: Check failure status and post in themes ops channel
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
if: failure()