Skip to content

Commit 42a3686

Browse files
committed
feat: add github action to automatically deploy on main branch
1 parent 075372b commit 42a3686

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main # or your default branch name
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v2
23+
with:
24+
version: 9
25+
26+
- name: Install dependencies
27+
run: pnpm install
28+
29+
- name: Build docs
30+
run: pnpm docs
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: './docs'
39+
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)