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
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
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
Configure build settings
- Build command:
cp -r deployment/netlify/functions netlify/functions && cp deployment/netlify.toml netlify.toml - Publish directory:
src/static
- Build command:
Set environment variables
- Go to Site settings > Build & deploy > Environment
- Add the following environment variables:
OPENAI_API_KEY: Your OpenAI API key
Deploy the site
- Click "Deploy site"
- Wait for the build and deployment to complete
Configure custom domain (optional)
- Go to Site settings > Domain management
- Click "Add custom domain"
- Follow the instructions to set up your domain
Post-Deployment
Verify functionality
- Test the chatbot by asking various questions
- Ensure responses include proper citations
- Test conversation context maintenance
Monitor usage
- Check Netlify function logs for errors
- Monitor OpenAI API usage
Update as needed
- Push changes to your Git repository for automatic deployment
- Or manually deploy updates through the Netlify dashboard