Skip to content

Commit 5b9bbbb

Browse files
author
Libish Murugesan
committed
Add GitHub Pages + Render deployment guide and config
1 parent 4a73b27 commit 5b9bbbb

File tree

3 files changed

+69
-12
lines changed

3 files changed

+69
-12
lines changed

.github/workflows/deploy-frontend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Build
3535
env:
3636
BASE_PATH: '/${{ github.event.repository.name }}/'
37-
VITE_API_BASE: 'https://topologicstudio-backend.onrender.com'
37+
VITE_API_BASE: ${{ vars.VITE_API_BASE || 'https://topologicstudio-backend.onrender.com' }}
3838
run: npm run build
3939
- name: Upload artifact
4040
uses: actions/upload-pages-artifact@v3

README.md

Lines changed: 58 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,18 @@ Toggle IFC walls as navigation obstacles for more spatially accurate routing.
4343
3. [Tech Stack](#tech-stack)
4444
4. [Architecture](#architecture)
4545
5. [Installation & Detailed Local Deployment (Windows)](#installation--detailed-local-deployment-windows)
46-
6. [Configuration](#configuration)
47-
7. [Usage Workflow](#usage-workflow)
48-
8. [Algorithms](#algorithms)
49-
9. [API Reference](#api-reference)
50-
10. [UI Parameters](#ui-parameters)
51-
11. [Feature Status](#feature-status)
52-
12. [Known Limitations](#known-limitations)
53-
13. [Troubleshooting](#troubleshooting)
54-
14. [Research Context](#research-context)
55-
15. [References](#references)
56-
16. [License](#license)
46+
6. [Web Deployment (GitHub Pages + Render)](#web-deployment-github-pages--render)
47+
7. [Configuration](#configuration)
48+
8. [Usage Workflow](#usage-workflow)
49+
9. [Algorithms](#algorithms)
50+
10. [API Reference](#api-reference)
51+
11. [UI Parameters](#ui-parameters)
52+
12. [Feature Status](#feature-status)
53+
13. [Known Limitations](#known-limitations)
54+
14. [Troubleshooting](#troubleshooting)
55+
15. [Research Context](#research-context)
56+
16. [References](#references)
57+
17. [License](#license)
5758

5859
---
5960

@@ -294,6 +295,52 @@ $env:Path = "$nodeDir;$env:Path"
294295

295296
---
296297

298+
## Web Deployment (GitHub Pages + Render)
299+
300+
This project is set up for:
301+
- **Frontend:** GitHub Pages (via GitHub Actions)
302+
- **Backend:** Render (Docker web service)
303+
304+
### 1) Deploy backend on Render
305+
306+
1. Push this repository to GitHub.
307+
2. In Render, create a new **Web Service** from this repo.
308+
3. Use these service settings:
309+
- Runtime: `Docker`
310+
- Root Directory: `topologicpy-web-backend`
311+
- Health Check Path: `/health`
312+
4. Add environment variable:
313+
- `CORS_ORIGINS=https://<your-github-username>.github.io`
314+
5. Deploy and copy the backend URL (example: `https://topologicstudio-backend.onrender.com`).
315+
316+
### 2) Configure frontend deploy URL
317+
318+
1. In GitHub repository settings, go to **Settings > Secrets and variables > Actions > Variables**.
319+
2. Add repository variable:
320+
- `VITE_API_BASE=https://<your-render-service>.onrender.com`
321+
322+
The workflow at `.github/workflows/deploy-frontend.yml` uses this variable during build.
323+
324+
### 3) Deploy frontend to GitHub Pages
325+
326+
1. In GitHub, enable Pages with **Source: GitHub Actions**.
327+
2. Push changes to `main` that include frontend/workflow updates.
328+
3. The `Deploy Frontend` workflow builds Vite and publishes `dist` to Pages.
329+
4. Frontend URL pattern:
330+
- `https://<your-github-username>.github.io/<repo-name>/`
331+
332+
### 4) Verify production
333+
334+
1. Open backend health URL: `https://<your-render-service>.onrender.com/health`
335+
2. Open frontend Pages URL.
336+
3. Upload IFC and run:
337+
- Build IFC egress graph
338+
- Compute IFC egress path
339+
- Start fire simulation
340+
4. If API calls fail in browser console, re-check `CORS_ORIGINS` and `VITE_API_BASE`.
341+
342+
---
343+
297344
## Configuration
298345

299346
### Frontend

render.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
- type: web
3+
name: topologicstudio-backend
4+
runtime: docker
5+
rootDir: topologicpy-web-backend
6+
autoDeploy: true
7+
healthCheckPath: /health
8+
envVars:
9+
- key: CORS_ORIGINS
10+
value: https://libishm1.github.io

0 commit comments

Comments
 (0)