-
Notifications
You must be signed in to change notification settings - Fork 26
42 lines (39 loc) · 1.07 KB
/
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
name: Deploy to GitHub Pages
on:
push:
branches: [main]
paths: [docs/**, .github/**]
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2
with:
version: 8.7.0
- name: Install dependencies
run: pnpm install --recursive
- uses: actions/setup-node@v2
with:
node-version: 20.x
- name: Build website
working-directory: ./
run: |
cd visual-editor
pnpm run build
cd ../docs
pnpm run build;
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build