**ci(workflows): add GitHub Pages workflow for demo deployment with custom domain**
### Changes: - Introduced `deploy-demo.yml` workflow in `.github/workflows/` to automate deployment to GitHub Pages: - Triggers on `main` branch pushes and manual workflow dispatch. - Includes steps for project setup, build, and deployment using `JamesIves/github-pages-deploy-action`. - Added `examples/CNAME` with custom domain `www.soulcraft.com`. ### Purpose: Streamlined and automated the deployment of the demo to GitHub Pages, ensuring efficient updates. Configured a custom domain for better branding and accessibility of the live demo.
This commit is contained in:
parent
461d015364
commit
02dd5a20bc
2 changed files with 34 additions and 0 deletions
33
.github/workflows/deploy-demo.yml
vendored
Normal file
33
.github/workflows/deploy-demo.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
name: Deploy Demo to GitHub Pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
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 ci
|
||||||
|
|
||||||
|
- 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: examples
|
||||||
|
branch: gh-pages
|
||||||
1
examples/CNAME
Normal file
1
examples/CNAME
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
www.soulcraft.com
|
||||||
Loading…
Add table
Add a link
Reference in a new issue