From 04ad0a70eb62c782baebb87385caf5d9cb4f23cd Mon Sep 17 00:00:00 2001 From: Mahdi Hazrati Date: Wed, 16 Oct 2024 09:15:48 +0330 Subject: [PATCH] add deployment workflow to github pages --- .../workflows/deploy-npui-github-pages.yaml | 35 +++++++++++++++++++ .storybook/manager-head.html | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/deploy-npui-github-pages.yaml create mode 100644 .storybook/manager-head.html diff --git a/.github/workflows/deploy-npui-github-pages.yaml b/.github/workflows/deploy-npui-github-pages.yaml new file mode 100644 index 0000000..ba18baf --- /dev/null +++ b/.github/workflows/deploy-npui-github-pages.yaml @@ -0,0 +1,35 @@ +# Workflow name +name: Build and Publish NPUI to GitHub Pages + +on: + # Event for the workflow to run on + push: + branches: + - 'main' # Replace with the branch you want to deploy from + +permissions: + contents: read + pages: write + id-token: write + +# List of jobs +jobs: + deploy: + runs-on: ubuntu-latest + # Job steps + steps: + # Manual Checkout + - uses: actions/checkout@v4 + + # Set up Node + - uses: actions/setup-node@v4 + with: + node-version: '16.x' + + #👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow + - uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3 + with: + install_command: npm ci # default: npm ci + build_command: npm run build-storybook # default: npm run build-storybook + path: storybook-static # default: dist/storybook + checkout: false # default: true \ No newline at end of file diff --git a/.storybook/manager-head.html b/.storybook/manager-head.html new file mode 100644 index 0000000..957f1c1 --- /dev/null +++ b/.storybook/manager-head.html @@ -0,0 +1 @@ +