brainy/.github/workflows/deploy-demo.yml
2025-06-23 14:46:26 -07:00

44 lines
998 B
YAML

name: Deploy Demo to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup Node.js 🔧
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies 📦
run: npm install --legacy-peer-deps
- name: Build project 🏗️
run: |
npm run build
npm run build:browser
- name: Prepare deployment 📦
run: |
mkdir -p deploy
mkdir -p deploy/demo
cp index.html deploy/
cp demo/index.html deploy/demo/
cp -r dist deploy/
cp brainy.png deploy/
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: deploy
branch: gh-pages