Bug fixed #4
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Add to known hosts | |
run: | | |
mkdir -p ~/.ssh/known_hosts | |
cp known_hosts ~/.ssh/known_hosts | |
- name: SSH | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
port: 22 | |
script: | | |
cd trackpack-telegram-bot | |
git stash | |
git pull origin main | |
source ~/.nvm/nvm.sh | |
nvm use v20.9.0 | |
npm install | |
pm2 restart trackpack-bot |