Skip to content

Commit 4390ea1

Browse files
committed
Add automated deployment of gh-pages
1 parent 26e9e42 commit 4390ea1

4 files changed

Lines changed: 740 additions & 15 deletions

File tree

.github/workflows/deploy-demo.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy Demo to GitHub Pages
2+
3+
on:
4+
push:
5+
paths:
6+
- 'gh-pages/**'
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: gh-pages
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '18'
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build demo
30+
run: npm run build
31+
32+
- name: Deploy to GitHub Pages
33+
run: npm run deploy
34+
env:
35+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)