React + Vite frontend for complaint submission, deployed to GitHub Pages from a gh-pages branch (no GitHub Actions).
.
|- index.html
|- package.json
|- vite.config.js
|- .env.example
|- src/
| |- App.jsx
| |- main.jsx
| `- index.css
`- public/
`- assets/rcat-logo.jpg
This app reads API URL from .env using:
VITE_API_URI
Recommended for this repo:
- Copy
.env.exampleto.env - Put your Google Apps Script
/execURL in.env
.env is ignored by git, so your local value is not committed.
- Install dependencies:
npm install
- Create env file:
Copy-Item .env.example .env
- Start dev server:
npm run dev
- First-time GitHub Pages setting:
- Go to
Settings->Pages - In
Build and deployment->Source, chooseDeploy from a branch - Branch:
gh-pages - Folder:
/ (root)
- Go to
- Deploy from local machine:
npm run deploy
npm run deploy will:
- Build with Vite (
dist/) - Push
dist/content to branchgh-pages
- Use
/exec, not/dev, for Apps Script URL. - Like any frontend config, API URL is visible in deployed client code.