add bun, pm2 and nodejs #7
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 to Server | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.16.0 | |
- name: SSH and Redeploy | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.PRIVATE_KEY }} | |
script: | | |
export NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
cd farcaster-praise-bot | |
git pull origin main | |
pm2 stop all | |
pm2 start --interpreter ~/.bun/bin/bun index.ts | |