-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (53 loc) · 1.98 KB
/
storybook-deploy.js.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Storybook deploy
on:
# workflow_run:
# workflows: [Build and Test] # Reuse the name of your tests workflow
# branches: [main, develop]
# types: [completed ]
push:
branches: [main, develop]
workflow_dispatch:
inputs:
description:
description: 'Manual run of publish storybook'
concurrency:
group: deploy-${{ github.workflow }}-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18' ]
name: Deploy with Node ${{ matrix.node }}
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
always-auth: 'true'
registry-url: 'https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/'
- name: Install
run: | # Install packages
npm install --prefer-offline --no-audit --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.NEXUSREADONLY2NPMTOKEN }}
# `npm rebuild` will run all those post-install scripts for us.
- name: rebuild and prepare
run: npm rebuild && npm run prepare --if-present
- name: Build 🔧
run: | # build the Storybook files
npm run build-storybook
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: storybook-static # The folder that the build-storybook script generates files.
clean: true # Automatically remove deleted files from the deploy branch
target-folder: / # The folder that we serve our Storybook files from