-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.23 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build and Publish to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- "main"
jobs:
deploy-storybook:
permissions:
packages: read
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: https://npm.pkg.github.com/
- name: Install and Build 🔧
run: | # Install npm packages and build the Storybook files
export NODE_OPTIONS="--max_old_space_size=4096"
npm install
npx browserslist@latest --update-db
npm run build -- --base /cetirizine/
npm run build-storybook -- --disable-telemetry -o dist/storybook
cp dist/index.html dist/404.html
env:
# also other environment variable
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
folder: dist # The folder that the build-storybook script generates files.
clean: true # Automatically remove deleted files from the deploy branch