Skip to content

Commit 7aea324

Browse files
committed
ci: automated publishing to GH pages
1 parent ec0c441 commit 7aea324

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: GitHub Pages Sync
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '22'
22+
23+
- name: Install dependencies
24+
run: npm install
25+
26+
- name: Build demo
27+
run: npm run build:demo
28+
29+
- name: Deploy
30+
uses: peaceiris/actions-gh-pages@v4
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_branch: demo
34+
publish_dir: ./demo
35+
commit_message: update demo

0 commit comments

Comments
 (0)