-
Notifications
You must be signed in to change notification settings - Fork 26
72 lines (60 loc) · 1.76 KB
/
Copy pathdeploy.yml
File metadata and controls
72 lines (60 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Deploy to GitHub Pages
on:
push:
branches:
- main
- webgpu
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout and Deploy Main Branch
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: main
- name: Set up Node.js for main
uses: actions/setup-node@v3
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies for main
run: npm install
# Build and deploy main branch
- name: Build and deploy main
run: |
npm run build
mkdir -p main_build
mv dist/* main_build/
echo "Deploying main branch..."
- name: Deploy main to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./main_build # Deploy from your custom directory
# Checkout and Deploy webgpu Branch
- name: Checkout webgpu branch
uses: actions/checkout@v3
with:
ref: webgpu
- name: Set up Node.js for webgpu
uses: actions/setup-node@v3
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies for webgpu
run: npm install
# Build and deploy webgpu branch
- name: Build and deploy webgpu
run: |
npm run build
mkdir -p webgpu_build
mv dist/* webgpu_build/
echo "Deploying webgpu branch..."
- name: Deploy webgpu to GitHub Pages subdirectory
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./webgpu_build
destination_dir: webgpu
keep_files: true