Skip to content

Commit 43e546e

Browse files
authored
Update deploy.yml
1 parent 9c63741 commit 43e546e

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@ on:
44
push:
55
branches:
66
- main
7-
- webgpu
7+
- webgpu
88

99
jobs:
1010
deploy:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
# Checkout main branch
14+
# Checkout and Deploy Main Branch
1515
- name: Checkout main branch
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717
with:
1818
ref: main
1919

2020
- name: Set up Node.js for main
21-
uses: actions/setup-node@v2
21+
uses: actions/setup-node@v3
2222
with:
2323
node-version: '22'
24+
cache: 'npm'
2425

2526
- name: Install dependencies for main
2627
run: npm install
@@ -32,21 +33,24 @@ jobs:
3233
mkdir -p main_build
3334
mv dist/* main_build/
3435
echo "Deploying main branch..."
35-
# Deploy using peaceiris/actions-gh-pages@v3 for main
36-
npx peaceiris/actions-gh-pages@v3 \
37-
--personal_token ${{ secrets.GITHUB_TOKEN }} \
38-
--publish_dir ./main_build
3936
40-
# Checkout webgpu branch
37+
- name: Deploy main to GitHub Pages
38+
uses: peaceiris/actions-gh-pages@v3
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./main_build # Deploy from your custom directory
42+
43+
# Checkout and Deploy webgpu Branch
4144
- name: Checkout webgpu branch
42-
uses: actions/checkout@v2
45+
uses: actions/checkout@v3
4346
with:
4447
ref: webgpu
4548

4649
- name: Set up Node.js for webgpu
47-
uses: actions/setup-node@v2
50+
uses: actions/setup-node@v3
4851
with:
4952
node-version: '22'
53+
cache: 'npm'
5054

5155
- name: Install dependencies for webgpu
5256
run: npm install
@@ -58,9 +62,11 @@ jobs:
5862
mkdir -p webgpu_build
5963
mv dist/* webgpu_build/
6064
echo "Deploying webgpu branch..."
61-
# Deploy using peaceiris/actions-gh-pages@v3 for webgpu
62-
npx peaceiris/actions-gh-pages@v3 \
63-
--personal_token ${{ secrets.GITHUB_TOKEN }} \
64-
--publish_dir ./webgpu_build \
65-
--destination_dir webgpu \
66-
--keep_files true
65+
66+
- name: Deploy webgpu to GitHub Pages subdirectory
67+
uses: peaceiris/actions-gh-pages@v3
68+
with:
69+
github_token: ${{ secrets.GITHUB_TOKEN }}
70+
publish_dir: ./webgpu_build
71+
destination_dir: webgpu
72+
keep_files: true

0 commit comments

Comments
 (0)