Skip to content

OK-496: Refaktoroitu CI-putkea ja lisätty storybookin julkaisulle oma… #73

OK-496: Refaktoroitu CI-putkea ja lisätty storybookin julkaisulle oma…

OK-496: Refaktoroitu CI-putkea ja lisätty storybookin julkaisulle oma… #73

Workflow file for this run

name: oph-design-system
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-storybook
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci --no-audit --prefer-offline --ignore-scripts
- uses: actions/cache/restore@v4
id: storybook
with:
path: storybook-static
key: ${{ github.sha }}
- name: Lint
run: |
npm run typecheck
npm run lint
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Test running example project with library import
run: npm run start-and-test-example
- name: Start and test storybook
run: npm run start-built-storybook-and-test
- uses: actions/upload-artifact@v4
if: always()
with:
name: screenshot-diffs
path: __snapshots__/__diff_output__/
retention-days: 10
if-no-files-found: ignore
- uses: ./.github/actions/deploy-storybook
if: github.ref == 'refs/heads/main'