Skip to content

API Route and websocket for chatting with chatbot #4

API Route and websocket for chatting with chatbot

API Route and websocket for chatting with chatbot #4

Workflow file for this run

name: Deploy to School VM
on:
push:
branches:
- main
pull_request:
types: [closed]
branches:
- main
jobs:
deploy:
if: github.event.pull_request.merged == true || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.VM_SSH_KEY }}
- name: Deploy via SSH
env:
VM_IP: ${{ secrets.VM_IP }}
VM_USER: ${{ secrets.VM_USER }}
run: |
ssh -o StrictHostKeyChecking=no $VM_USER@$VM_IP '
cd GITLOCAL/chat-service/ && \
git pull && \
docker compose down && \
docker compose -f docker-compose-prod.yml up -d
'