Skip to content

OK-496: Exportoidaan next.js-teemasta myös kustomoidut osat #62

OK-496: Exportoidaan next.js-teemasta myös kustomoidut osat

OK-496: Exportoidaan next.js-teemasta myös kustomoidut osat #62

Workflow file for this run

name: oph-design-system
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci --no-audit --prefer-offline --ignore-scripts
- 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: Build storybook
run: npm run build-storybook -- --quiet
- name: Run storybook
run: npx http-server ./storybook-static -p 6006 &
- name: Test Storybook
run: npm run test-storybook:coverage
- uses: actions/upload-artifact@v4
if: always()
with:
name: screenshot-diffs
path: __snapshots__/__diff_output__/
retention-days: 10
if-no-files-found: ignore
- name: Publish storybook
run: |
git clone https://github.com/Opetushallitus/ci-tools.git
source ci-tools/common/setup-tools.sh
sh scripts/deploy-storybook.sh