Skip to content

fix: updating CI node to v20 and rebuilding dependency #70

fix: updating CI node to v20 and rebuilding dependency

fix: updating CI node to v20 and rebuilding dependency #70

Workflow file for this run

name: Build & Publish Storybook
on:
push:
branches:
- main
defaults:
run:
shell: bash
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
publish_release:
name: Build & Publish package
runs-on: self-hosted
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://npm.pkg.github.com"
- name: Install dependencies
run: |
npm ci
- name: Check the codestyle
run: |
npm run lint
- name: Run unit test
run: |
npm run test:unit
- name: Build the static Storybook site
run: |
npm run build:storybook
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./storybook-static"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# even if its redundant to the previous step, we need to upload the storybook also to chromatic to have a new baseline for comparing the next changes
- name: Publish to Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{secrets.CHROMATIC_PROJECT_TOKEN}}
exitZeroOnChanges: true
exitOnceUploaded: true
buildScriptName: "build:storybook"