-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (36 loc) · 1.15 KB
/
ci-docs-deploy.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
name: Docs Deploy
on:
push:
branches: ['main']
workflow_dispatch:
branches: ['main']
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Enable Corepack
run: corepack enable
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
cache: 'yarn'
- uses: actions/cache@v2
with:
path: |
"**/node_modules"
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-
- name: Build
working-directory: ./
run: yarn && yarn build && yarn build-storybook
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static