feat(storybook): add package versions docpage #3072
Workflow file for this run
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: Continuous Deployment | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install pnpm package manager | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
- name: Set up Node.js version | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile | |
pnpm ls --recursive | |
lint: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install pnpm package manager | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
- name: Set up Node.js version | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: "Continuous Integration: lint" | |
run: pnpm run --if-present lint | |
build: | |
runs-on: ubuntu-latest | |
needs: [install, lint] | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install pnpm package manager | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
- name: Set up Node.js version | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: "Continuous Integration: build" | |
env: | |
BASE_URL: "/rvo/" | |
run: pnpm run --if-present build | |
- name: "Continuous Integration: test build" | |
run: pnpm run --if-present test-build | |
- name: "Generate design system website" | |
run: pnpm run --filter @nl-rvo/design-system-website generate | |
- name: "Retain build artifact: website" | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: website | |
path: packages/design-system-website/dist/ | |
retention-days: 1 | |
- name: "Retain build artifact: storybook" | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: storybook | |
path: packages/storybook/dist/ | |
retention-days: 1 | |
test: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install pnpm | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
- name: Set up Node.js version | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: "Continuous Integration: test" | |
run: pnpm run --if-present test | |
publish-uxpin: | |
runs-on: ubuntu-latest | |
needs: install | |
if: github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'skip ci') | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: refs/heads/master | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
- name: Set up Node.js version | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Push to UXPin | |
continue-on-error: true | |
run: pnpm install && pnpm exec uxpin-merge push --token ${{ secrets.UXPIN_TOKEN }} | |
working-directory: uxpin-merge | |
publish-chromatic: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm package manager | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
- name: Set up Node.js version | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: "Continuous Integration: build Storybook with animation disabled" | |
env: | |
STORYBOOK_REDUCED_MOTION: 1 | |
run: pnpm run --if-present build | |
- name: Publish to Chromatic | |
uses: chromaui/action@57a72947e9d7a6d213906cd506276c707e0c580f # v11.4.0 | |
if: github.event.pull_request.draft == false | |
with: | |
autoAcceptChanges: master | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_NLDESIGNSYSTEM }} | |
storybookBuildDir: packages/storybook/dist/ | |
publish-website: | |
runs-on: ubuntu-latest | |
needs: [build, lint, test] | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout release branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: "Restore build artifact: website" | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: website | |
path: packages/design-system-website/dist/ | |
- name: Continuous Deployment to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@5c6e9e9f3672ce8fd37b9856193d2a537941e66c # v4.6.1 | |
with: | |
branch: gh-pages | |
folder: packages/design-system-website/dist/ | |
publish-npm: | |
runs-on: ubuntu-latest | |
needs: [build, lint, test] | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout release branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set up Node.js version | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Install pnpm package manager | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
- name: "Continuous Deployment: install" | |
run: | | |
pnpm install --frozen-lockfile | |
pnpm ls --recursive | |
- name: "Continuous Deployment: build" | |
run: pnpm run --if-present build | |
- name: "Continuous Deployment: publish to GitHub repository" | |
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9 | |
id: changeset | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_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" | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
with: | |
commit: "docs(release): design system packages" | |
setupGitUser: false | |
title: "docs(release): design system packages" | |
publish: "pnpm run publish" |