Skip to content

Update deploy.yml

Update deploy.yml #160

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
- webgpu
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout main branch
- name: Checkout main branch
uses: actions/checkout@v2
with:
ref: main
- name: Set up Node.js for main
uses: actions/setup-node@v2
with:
node-version: '22'
- 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..."
# Deploy using peaceiris/actions-gh-pages@v3 for main
npx peaceiris/actions-gh-pages@v3 \
--personal_token ${{ secrets.GITHUB_TOKEN }} \
--publish_dir ./main_build
# Checkout webgpu branch
- name: Checkout webgpu branch
uses: actions/checkout@v2
with:
ref: webgpu
- name: Set up Node.js for webgpu
uses: actions/setup-node@v2
with:
node-version: '22'
- 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..."
# Deploy using peaceiris/actions-gh-pages@v3 for webgpu
npx peaceiris/actions-gh-pages@v3 \
--personal_token ${{ secrets.GITHUB_TOKEN }} \
--publish_dir ./webgpu_build \
--destination_dir webgpu \
--keep_files true