Welcome to my personal portfolio website built with React + Vite and deployed on GitHub Pages.
https://pierre-clement-oise.fr
This project showcases my work and skills as a developer. It is built with:
- React for UI
- Vite as the build tool
- jankojjs/react-static-prerender for prerendring the website
- GitHub Actions for CI/CD
- GitHub Pages for hosting
The site is automatically built and deployed whenever changes are pushed to the dev branch. The main branch is optional and contains only documentation (README/LICENSE).
Below is a visual representation of the workflow:
Workflow Steps:
- Push code to
devbranch - GitHub Actions:
- Checkout code
- Install dependencies
- Build Vite app (
npm run build) - Prerender the
build/folder (npm run prerender) - Upload
static-pages/folder as artifact - Deploy to GitHub Pages
- GitHub Pages serves the site at your custom domain.
- dev: Source code, triggers build & deployment
- main: Optional, only README/LICENSE, not used for deployment
- GitHub Actions automatically handles CI/CD
- Custom Domain:
pierre-clement-oise.frviapublic/CNAME - Vite
baseconfiguration: set to/for custom domain
To run the project locally:
git clone https://github.com/KadenHD/portfolio.git
git checkout dev
npm install
npm run devTo build locally:
npm run buildTo prerender locally:
npm run prerenderNote
This will previously auto-build.
To run the project locally as production:
npm run previewThis project uses EmailJS for the contact form.
The following environment variables are required and must be prefixed with VITE_
(because they are injected at build time by Vite):
VITE_EMAILJS_SERVICE_IDVITE_EMAILJS_TEMPLATE_IDVITE_EMAILJS_PUBLIC_KEY
Create a .env file at the project root:
VITE_EMAILJS_SERVICE_ID=your_service_id
VITE_EMAILJS_TEMPLATE_ID=your_template_id
VITE_EMAILJS_PUBLIC_KEY=your_public_keyThese variables are stored as GitHub Actions Secrets and injected during the
npm run build step of the CI/CD workflow.
dist/andstatic-pages/are never committed; CI/CD handles deployment- CNAME file must be in
public/for custom domain mainbranch is safe to have README/LICENSE only