| # Netlify Deployment Steps | |
| This document outlines the steps to deploy the Educational Research Methods Chatbot to Netlify. | |
| ## Prerequisites | |
| - Netlify account | |
| - GitHub account (optional, for continuous deployment) | |
| - OpenAI API key for Command R+ | |
| ## Deployment Steps | |
| 1. **Prepare the repository** | |
| - Ensure all files are properly organized | |
| - Static files in `src/static` | |
| - Netlify functions in `deployment/netlify/functions` | |
| - Netlify configuration in `deployment/netlify.toml` | |
| 2. **Create a new Netlify site** | |
| - Log in to Netlify | |
| - Click "New site from Git" or "Import an existing project" | |
| - Connect to your Git provider (GitHub, GitLab, Bitbucket) | |
| - Select the repository | |
| 3. **Configure build settings** | |
| - Build command: `cp -r deployment/netlify/functions netlify/functions && cp deployment/netlify.toml netlify.toml` | |
| - Publish directory: `src/static` | |
| 4. **Set environment variables** | |
| - Go to Site settings > Build & deploy > Environment | |
| - Add the following environment variables: | |
| - `OPENAI_API_KEY`: Your OpenAI API key | |
| 5. **Deploy the site** | |
| - Click "Deploy site" | |
| - Wait for the build and deployment to complete | |
| 6. **Configure custom domain (optional)** | |
| - Go to Site settings > Domain management | |
| - Click "Add custom domain" | |
| - Follow the instructions to set up your domain | |
| ## Post-Deployment | |
| 1. **Verify functionality** | |
| - Test the chatbot by asking various questions | |
| - Ensure responses include proper citations | |
| - Test conversation context maintenance | |
| 2. **Monitor usage** | |
| - Check Netlify function logs for errors | |
| - Monitor OpenAI API usage | |
| 3. **Update as needed** | |
| - Push changes to your Git repository for automatic deployment | |
| - Or manually deploy updates through the Netlify dashboard | |