diff --git a/.github/workflows/DeployPipeline.yml b/.github/workflows/DeployPipeline.yml index a4b66af..bd64034 100644 --- a/.github/workflows/DeployPipeline.yml +++ b/.github/workflows/DeployPipeline.yml @@ -23,3 +23,25 @@ jobs: source: ./ target: /home/ubuntu/slash/ overwrite: true + + - name: SSH into EC2 and restart app + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.EC2_HOST }} + username: ${{ secrets.EC2_USERNAME }} + key: ${{ secrets.EC2_SSH_KEY }} + script: | + pm2 stop all + + yarn global add turbo + yarn turbo build + + pm2 start all + + pm2 stop slash_landing + pm2 stop slash_admin + pm2 stop slash_web + pm2 stop slash_backend + pm2 stop slash_code_executor + + pm2 start yarn --name slash_landing -- dev