The frontend is configured to deploy automatically to GitHub Pages when changes are pushed to the main branch.
-
Enable GitHub Pages in your repository:
- Go to your repository Settings
- Navigate to "Pages" in the left sidebar
- Under "Source", select "GitHub Actions"
-
Configure the production backend URL:
- Edit
.github/workflows/deploy.yml - Replace
https://your-backend-domain.comwith your actual production backend URL - The environment variable
VITE_API_URLwill be used by the frontend to connect to your backend
- Edit
-
Deploy:
- Push your changes to the main branch
- GitHub Actions will automatically build and deploy your frontend
- Your site will be available at:
https://your-username.github.io/sidekick-code-web/
To test the production build locally:
cd frontend
npm run build:prod
npm run previewThe frontend uses the following environment variables:
VITE_API_URL: The base URL for your backend API- Development: Defaults to
http://localhost:8000 - Production: Set in the GitHub Actions workflow (currently set to
https://your-backend-domain.com)
- Development: Defaults to
When you're ready to connect to your production backend:
- Edit
.github/workflows/deploy.yml - Update the
VITE_API_URLenvironment variable under the "Build" step - Push your changes to trigger a new deployment
If you need to deploy manually:
cd frontend
npm run build:prod
# Upload the contents of the dist/ folder to your web server