39 lines
801 B
YAML
39 lines
801 B
YAML
name: Build and Deploy Storybook
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
|
|
- name: Build package
|
|
run: yarn run build
|
|
|
|
- name: Build Histoire
|
|
run: yarn run story:build
|
|
|
|
- name: Create CNAME file
|
|
run: echo 'ui.jingrow.com' > ./.histoire/dist/CNAME
|
|
|
|
- name: Deploy Histoire to
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.JINGROW_UI_PAGES_TOKEN }}
|
|
publish_dir: ./.histoire/dist
|
|
publish_branch: gh-pages
|