### Changes: - **rollup.config.js**: - Merged and reformatted `nodeBuiltins` definition for cleaner code. - Updated `input` path from `examples/browser_compatible_exports.ts` to `demo/browser_compatible_exports.ts`. - Reformatted `replace` plugin configuration for better readability. - **.github/workflows/deploy-demo.yml**: - Updated deployment folder from `examples` to `demo`. - **Renamed**: - `examples/browser_compatible_exports.ts` → `demo/browser_compatible_exports.ts`. - **scripts/generate-version.js**: - Removed unnecessary semicolons for consistent formatting. ### Purpose: Aligned folder structure by migrating from `examples` to `demo` for uniformity and better organization. Improved code readability and formatting across configurations and scripts.
36 lines
795 B
YAML
36 lines
795 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: '23'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies 📦
|
|
run: npm install --legacy-peer-deps
|
|
|
|
- name: Build project 🏗️
|
|
run: |
|
|
npm run build
|
|
npm run build:browser
|
|
|
|
- name: Deploy to GitHub Pages 🚀
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
folder: demo
|
|
branch: gh-pages
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|