Skip to content

feat: tokens for logo (#960) #2476

feat: tokens for logo (#960)

feat: tokens for logo (#960) #2476

name: Continuous Deployment
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
continuous-integration:
name: Continuous integration
runs-on: ubuntu-latest
steps:
- name: Download code from GitHub
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Configure GitHub Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Install pnpm package manager
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Set up Node.js version
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies specified in package.json
run: pnpm install
- name: Run the lint script in package.json scripts
run: pnpm run --if-present lint
- name: Run the build script in package.json scripts
run: pnpm run --if-present build
- name: Run the test script in package.json scripts
run: pnpm run --if-present test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Publish to Chromatic
uses: chromaui/action@1fc59b137c52d2f7571c8cf0b40daad2794fd551 # v11.25.2
if: |
github.event.pull_request.draft == false &&
github.actor != 'dependabot[bot]'
with:
autoAcceptChanges: main
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: packages/storybook/dist/
- name: Upload the Storybook artifact from the build step
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: packages/storybook/dist/
publish-storybook:
runs-on: ubuntu-latest
needs: continuous-integration
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deploy-pages.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deploy-pages
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
publish-npm:
runs-on: ubuntu-latest
needs: continuous-integration
if: github.ref == 'refs/heads/main'
steps:
- name: Download code from GitHub
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.GH_TOKEN }}
- name: Install pnpm package manager
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Set up Node.js version
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: .nvmrc
- name: Install dependencies specified in package.json
run: pnpm install
- name: Run the build script in package.json
run: pnpm run --if-present build
- name: Check the release
run: pnpm run lint-release
- name: 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"