-
Notifications
You must be signed in to change notification settings - Fork 142
38 lines (34 loc) · 1.35 KB
/
deploy-latest.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
# Deploy production storybook environment from release branch to Github Pages
name: Deploy production storybook
# This workflow is triggered from the `release-base` workflow when a full release
# has been successfully completed
on:
repository_dispatch:
types: [deploy-latest-storybook]
jobs:
deploy-latest-storybook:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
# Checkout release branch to build storybook
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: '0'
ref: ${{ github.event.client_payload.branch }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Build storybook
run: yarn storybook:build
# Deploy to staging Github Pages using `gh-pages` package
- name: Deploy to latest
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d packages/core/storybook-static -u "github-actions-bot <[email protected]>" --dest latest --message "chore(deploy): deploy to gh-pages latest"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}