docs: add design tokens JSON to Sidenav #3468
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: Build and deploy Storybook | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Install pnpm package manager | |
uses: pnpm/[email protected] | |
with: | |
version: 8 | |
- name: Set up Node.js version | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile | |
pnpm ls --recursive | |
- name: run linters | |
run: | | |
pnpm run lint:css | |
pnpm run lint:package | |
pnpm run lint:js | |
pnpm run lint:prettier | |
- name: build library | |
run: pnpm run build:library | |
- name: typecheck | |
run: pnpm run typecheck | |
- name: build storybook | |
run: pnpm run build:storybook | |
- name: Upload storybook | |
uses: actions/[email protected] | |
with: | |
name: storybook | |
path: storybook-static | |
- name: Publish to Chromatic | |
uses: chromaui/[email protected] | |
if: | | |
github.event.pull_request.draft == false && | |
github.action != 'dependabot[bot]' | |
with: | |
autoAcceptChanges: main | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
storybookBuildDir: storybook-static | |
deploy-storybook: | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Download storybook artifact | |
uses: actions/[email protected] | |
with: | |
name: storybook | |
path: storybook-static | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: storybook-static | |
publish-npm: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/[email protected] | |
with: | |
token: ${{ secrets.GH_ADMIN_TOKEN }} | |
- name: Install pnpm package manager | |
uses: pnpm/[email protected] | |
with: | |
version: 8 | |
- name: Set up Node.js version | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile | |
pnpm ls --recursive | |
- name: build library | |
run: pnpm run build | |
- name: lerna version | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | |
GIT_AUTHOR_NAME: "NL Design System" | |
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | |
GIT_COMMITTER_NAME: "NL Design System" | |
run: | | |
git push --set-upstream origin HEAD | |
pnpm run release | |
- name: lerna publish | |
env: | |
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
run: | | |
pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_ACCESS_TOKEN}" | |
pnpm config set access public | |
pnpm run publish | |
pnpm config delete "//registry.npmjs.org/:_authToken" |