Skip to content

πŸ› fix(chatgptoot.js): update method name from openai.createImage to o… #30

πŸ› fix(chatgptoot.js): update method name from openai.createImage to o…

πŸ› fix(chatgptoot.js): update method name from openai.createImage to o… #30

Workflow file for this run

name: Deploy to DigitalOcean
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to DigitalOcean
env:
PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
HOST: ${{ secrets.DROPLET_IP }}
USERNAME: skullzarmy
run: |
echo "$PRIVATE_KEY" > deploy_key
chmod 600 deploy_key
# Git Pull
ssh -o StrictHostKeyChecking=no -i deploy_key $USERNAME@$HOST "cd /home/skullzarmy/chatGPToot && git pull origin master" && echo "Git pull successful"
# NPM Install
ssh -o StrictHostKeyChecking=no -i deploy_key $USERNAME@$HOST "cd /home/skullzarmy/chatGPToot && npm install" && echo "NPM install successful"
# Kill Existing Bot Process
ssh -o StrictHostKeyChecking=no -i deploy_key $USERNAME@$HOST "pkill -f 'screen -S chatgptoot_bot_session -X quit || true" && echo "Attempted to kill existing bot processes"
# Start Bot
ssh -o StrictHostKeyChecking=no -i deploy_key $USERNAME@$HOST "cd /home/skullzarmy/chatGPToot && screen -dmS chatgptoot_bot_session node app/chatgptoot.js > logs/bot-log.log 2>&1" && echo "Bot started"
# Remove Deploy Key
echo "Removing deploy key"
rm -f deploy_key