Skip to content

Commit eaaccca

Browse files
authored
Merge pull request #17 from grayhatdevelopers/demo
feat: Add GitHub Actions workflow for deploying demo to GitHub Pages
2 parents 8dfde1b + 22ab5ea commit eaaccca

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/deploy-demo.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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: Setup pnpm
25+
uses: pnpm/action-setup@v2
26+
with:
27+
version: 8
28+
29+
- name: Install dependencies
30+
working-directory: demo
31+
run: pnpm install
32+
33+
- name: Build Vite project
34+
working-directory: demo
35+
run: pnpm run build
36+
37+
- name: Deploy dist folder to GitHub Pages
38+
uses: peaceiris/actions-gh-pages@v3
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: demo/dist

0 commit comments

Comments
 (0)