Skip to content

Commit 9d0684d

Browse files
committed
ci: add build
1 parent 76062fa commit 9d0684d

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build Demo and Deploy to Github Pages
2+
permissions:
3+
contents: write
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: "18"
21+
22+
- name: Install and Build
23+
run: npm install && npm run build:web
24+
25+
- name: Extra Files
26+
run: |
27+
# Switch to the generated directory
28+
cd dist
29+
30+
# Set custom domain for GitHub Pages
31+
# echo "youdomain.com" > CNAME
32+
33+
# Required to bypass Jekyll on GitHub Pages
34+
echo "" > .nojekyll
35+
36+
- name: Deploy
37+
uses: JamesIves/[email protected]
38+
with:
39+
single-commit: true
40+
branch: gh-pages
41+
clean: true
42+
folder: dist

0 commit comments

Comments
 (0)