-
Notifications
You must be signed in to change notification settings - Fork 7
38 lines (34 loc) · 1.2 KB
/
github-pages.yml
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
name: Deploy Documentation
on:
workflow_call:
inputs:
version_to_deploy:
default: 'master'
required: false
type: string
jobs:
deploy-docs-n-storybook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
persist-credentials: false
- run: echo "Running on branch ${{ github.ref_name }}..."
- uses: actions/setup-node@v3
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
node-version: '18'
- run: npm ci --prefer-offline
- run: npm run build
- run: mkdir docs_out
- run: npx storybook build -c .storybook -o docs_out/storybook/${{ inputs.version_to_deploy }}
env:
NODE_OPTIONS: --max-old-space-size=4096
- uses: JamesIves/github-pages-deploy-action@releases/v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to
FOLDER: docs_out/storybook/${{ inputs.version_to_deploy }} # The folder the action should deploy
TARGET-FOLDER: storybook/${{ inputs.version_to_deploy }} # The destination folder to deploy to