Deployed automatically to GitHub Pages with end-to-end (Playwright) tests run after each deployment (including preview deployments for pull requests).
pnpm install
pnpm devOpen http://localhost:5173 – hot reload is enabled.
- React 18 + TypeScript
- Vite (fast dev server & build)
- Tailwind CSS
- Playwright (cross-browser e2e)
- GitHub Actions (CI/CD)
- GitHub Pages (hosting)
- dev: start local dev server with hot reload
- build: type-check and create production bundle
- preview: preview the production build locally
- test:e2e: run Playwright tests (starts dev server automatically if BASE_URL not set)
- test:e2e:ci: CI-friendly reporter
- test:e2e:report: open last HTML report
pnpm install
pnpm devpnpm build
pnpm preview- Push to main (or open a pull request) triggers workflow.
- Build job creates static bundle (dist) and uploads artifact.
- Deploy job publishes to GitHub Pages (production for main, preview for PRs) and exposes the site URL as an output.
- E2E job runs Playwright tests against the deployed URL (production or preview). Failing tests will fail the workflow but the deployment artifact remains available.
Trigger the workflow manually via the Actions tab (workflow_dispatch). It will build, deploy, and test just like a push.
Default (will start dev server automatically):
pnpm test:e2eAgainst an already running or deployed site:
BASE_URL=http://localhost:5173 pnpm test:e2eOpen HTML report:
pnpm test:e2e:reportThe workflow installs browsers, deploys the site, and sets BASE_URL to the deployed (or preview) URL before running tests.
Edit src/index.css or add utility classes directly in components. Purge is automatic via content globs in tailwind.config.js.
| Task | Command |
|---|---|
| Install deps | pnpm install |
| Start dev | pnpm dev |
| Build prod | pnpm build |
| Preview build | pnpm preview |
| Run e2e | pnpm test:e2e |
| E2E CI style | pnpm test:e2e:ci |
| Show last report | pnpm test:e2e:report |
- The
BASE_URLenv var disables the auto-start webServer in Playwright so tests target the provided deployment. - For PRs, a preview URL is used (supports review before merge). The workflow selects
page_urlorpreview_urlautomatically. - Lockfile is ignored in
.gitignorefor simplicity; remove that line to pin dependencies.
- Add unit tests with Vitest.
- Add ESLint + Prettier config files.
- Introduce a basic router for multiple pages.
Happy hacking!