-
Notifications
You must be signed in to change notification settings - Fork 103
49 lines (42 loc) · 1.4 KB
/
docs-stable.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
name: Deploy Docs (Stable)
on:
release:
types:
- 'released'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install node_modules
run: yarn install --immutable
env:
CYPRESS_INSTALL_BINARY: 0
- name: Get Major Version
run: |
MAJOR_VERSION=$(node -p -e "/^(\d+)\./.exec(require('./lerna.json').version)[1]")
echo "MAJOR_VERSION=${MAJOR_VERSION}" >> "$GITHUB_ENV"
- name: Build Storybook
run: |
yarn build:storybook
yarn build:storybook-sitemap --basePath "v${{ env.MAJOR_VERSION }}"
env:
NODE_OPTIONS: '--max-old-space-size=4096'
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4.6.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: .out # The folder the action should deploy.
target-folder: v${{ env.MAJOR_VERSION }}
clean: true