-
-
Notifications
You must be signed in to change notification settings - Fork 9
49 lines (44 loc) · 1.1 KB
/
gh-pages.yaml
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 to github pages
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "site/**"
- "docs/**"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Installing Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Populate out directory
run: |
# Create out directory
mkdir -p out/docs out/site-assets out/storybook
# Build and copy docs
cd docs
npm install
npm run build
cp -a build/* ../out/
cd ..
# # Build static storybook
# npm install
# npm run build:storybook
# cp -a storybook-static out/storybook
# Copy site assets
cp -a site/assets/* out/site-assets
cp site/index.html out/index.html
echo > out/.nojekyll
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.DEPLOY_TOKEN }}
publish_dir: ./out
publish_branch: gh-pages
cname: goodtok.io