Skip to content

Remove warning notification #2499

Remove warning notification

Remove warning notification #2499

name: Continuous Deployment
on:
push:
branches:
- master
pull_request:
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4.1.1
- name: Install pnpm package manager
uses: pnpm/action-setup@v3.0.0
with:
version: ^8.8
- name: Set up Node.js version
uses: actions/setup-node@v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: |
pnpm install
pnpm ls --recursive
lint:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout branch
uses: actions/checkout@v4.1.1
- name: Install pnpm package manager
uses: pnpm/action-setup@v3.0.0
with:
version: ^8.8
- name: Set up Node.js version
uses: actions/setup-node@v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: |
pnpm install
- 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@v4.1.1
- name: Install pnpm package manager
uses: pnpm/action-setup@v3.0.0
with:
version: ^8.8
- name: Set up Node.js version
uses: actions/setup-node@v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: |
pnpm install
- 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: |
npm run generate -w ./packages/design-system-website
- name: "Retain build artifact: website"
uses: actions/upload-artifact@v4.3.1
with:
name: website
path: packages/design-system-website/dist/
retention-days: 1
- name: "Retain build artifact: storybook"
uses: actions/upload-artifact@v4.3.1
with:
name: storybook
path: packages/storybook/dist/
retention-days: 1
test:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout branch
uses: actions/checkout@v4.1.1
- uses: pnpm/action-setup@v3.0.0
name: Install pnpm
id: pnpm-install
with:
version: ^8.8
- name: Set up Node.js version
uses: actions/setup-node@v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: |
pnpm install
- name: "Continuous Integration: test"
run: |
pnpm run --if-present test
publish-uxpin:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout branch
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3.0.0
name: Install pnpm
id: pnpm-install
with:
version: ^8.8
- name: Set up Node.js version
uses: actions/setup-node@v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: |
pnpm install
- name: Push to UXPin
continue-on-error: true
if: "github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'skip ci')"
run: |
npm install && npx 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@v4.1.1
with:
fetch-depth: 0
- name: Install pnpm package manager
uses: pnpm/action-setup@v3.0.0
id: pnpm-install
with:
version: ^8.8
- name: Set up Node.js version
uses: actions/setup-node@v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: |
pnpm install
- 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@v11
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@v4.1.1
- name: "Restore build artifact: website"
uses: actions/download-artifact@v4.1.4
with:
name: website
path: packages/design-system-website/dist/
- name: Continuous Deployment to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
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@v4.1.1
with:
token: ${{ secrets.GH_TOKEN }}
- name: Set up Node.js version
uses: actions/setup-node@v4.0.2
with:
node-version-file: ".nvmrc"
- name: Install pnpm package manager
uses: pnpm/action-setup@v3.0.0
with:
version: ^8.8
- name: "Continuous Deployment: install"
run: |
pnpm install
pnpm ls --recursive
- name: "Continuous Deployment: build"
run: |
pnpm run --if-present build
- name: "Continuous Deployment: publish to GitHub repository"
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"
run: |
git push --set-upstream origin HEAD
pnpm run release
- name: "Continuous Deployment: publish to npm"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
pnpm run publish
pnpm config delete "//registry.npmjs.org/:_authToken"