A zero-external-math dependency React app for teaching photovoltaic concepts: tilt, azimuth, cloud cover, shading, soiling, inverter/wiring losses. Includes scenario presets and built‑in self‑tests.
npm install
npm run devnpm run build
npm run preview- Create a new repo on GitHub (e.g.,
solar-panel-lab). - In this folder, run:
git init git add . git commit -m "feat: initial solar lab" git branch -M main git remote add origin https://github.com/<YOUR-USER>/solar-panel-lab.git git push -u origin main
- Enable Pages: Settings → Pages → Source =
GitHub Actions - Add this workflow at
.github/workflows/pages.yml
name: Deploy Vite app to Pages
on:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
- uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4After the first push, Pages will publish your app at https://<YOUR-USER>.github.io/solar-panel-lab/.