-
Notifications
You must be signed in to change notification settings - Fork 29
46 lines (37 loc) · 1.17 KB
/
github-pages.yml
File metadata and controls
46 lines (37 loc) · 1.17 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
name: Github pages deployment
on:
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 22.x
uses: actions/setup-node@v1
with:
node-version: 22.x
- name: Enable Corepack
run: corepack enable
# setup cache
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install modules
run: yarn
- name: Build storybook
run: yarn build-storybook
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.