Login working now, need to fix profile, and chat API. #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Backend | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Deploy to Digital Ocean | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.DROPLET_HOST }} | |
username: ${{ secrets.DROPLET_USERNAME }} | |
key: ${{ secrets.DEPLOY_SSH_KEY }} | |
script: | | |
cd ~/pt-gpt | |
git stash push | |
git stash drop | |
git pull | |
sudo wall "Pulled latest version." -n | |
npm install | |
sudo wall "Installed any new dependencies." -n | |
cd frontend | |
npm install | |
sudo wall "Installed any new dependencies for frontend." -n | |
npm run web | |
sudo wall "Built Web version of frontend." -n | |
npm run export | |
sudo wall "Built IOS / Android versions of frontend." -n | |
pm2 restart pt-gpt | |
sudo wall "✔️Deployed new version of PT-GPT at http://pt-gpt.com" -n |