-
Notifications
You must be signed in to change notification settings - Fork 207
42 lines (35 loc) · 1.09 KB
/
simorgh-deploy-storybook.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
name: Deploy Storybook
on:
push:
branches:
- latest
jobs:
deploy-storybook:
name: Deploy Storybook to GitHub pages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Cache Node Modules
id: cache
uses: actions/cache@v2
with:
path: node_modules
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: Install Node Modules
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Build Storybook
run: |
yarn build:storybook
git config --global user.name "simorgh-bbc"
git config --global user.email "DENewsSimorghDev@bbc.co.uk"
- name: Deploy Storybook
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.SIMORGH_DEV_STORYBOOK_RELEASE }}
BRANCH: gh-pages
FOLDER: storybook_dist
CLEAN: true # Automatically remove deleted files from the deploy branch