forked from UI5/webcomponents-react
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.53 KB
/
Copy pathdocs-stable.yml
File metadata and controls
47 lines (40 loc) · 1.53 KB
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
name: Deploy Docs (Stable)
on:
workflow_call:
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js environment
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
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('./packages/main/package.json').version)[1]")
echo "MAJOR_VERSION=${MAJOR_VERSION}" >> "$GITHUB_ENV"
- name: Build Storybook
run: |
yarn build:sb-with-search
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@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
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