Skip to content

Commit 3ecbe38

Browse files
committed
feat: Add GitHub Actions workflow for deploying demo to GitHub Pages
1 parent 8c7791e commit 3ecbe38

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/deploy-demo.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy Demo
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
24+
- name: Install dependencies
25+
working-directory: demo
26+
run: npm ci
27+
28+
- name: Build Vite project
29+
working-directory: demo
30+
run: npm run build
31+
32+
- name: Deploy dist folder to GitHub Pages
33+
uses: peaceiris/actions-gh-pages@v3
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: demo/dist

0 commit comments

Comments
 (0)