add deploy script

This commit is contained in:
silentsilas 2024-09-22 01:32:24 -04:00
parent d865383e7d
commit f37d1fdaab
Signed by: silentsilas
GPG Key ID: 113DFB380F724A81
2 changed files with 23 additions and 0 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vercel
vectorstore
ecosystem.config.js

22
scripts/deploy.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Pull the latest changes
git pull
# Build the project
npm run build
# Copy necessary files
cp package.json ./build/
cp package-lock.json ./build/
# Create or update the .env file
# echo "ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY" >> ./build/.env
#echo "OPENAI_API_KEY=$OPENAI_API_KEY" >> ./build/.env
# Navigate to build directory and install dependencies
cd build
npm install
# Restart the application
pm2 restart ecosystem.config.js