Deploy from Master #32
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 from Master | |
run-name: "Deploy from Master" | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy from master | |
steps: | |
- name: Deploy to DigitalOcean Droplet | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{secrets.HOST}} | |
username: ${{secrets.USERNAME}} | |
key: ${{secrets.KEY}} | |
script: | | |
cd bot-hrach | |
pm2 stop ecosystem.config.js | |
git stash | |
git checkout master | |
git pull | |
git stash pop | |
npm i --production | |
pm2 start ecosystem.config.js | |
pm2 save |