Deploy #54
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": | |
workflow_run: | |
workflows: [CI] | |
branches: [master] | |
types: | |
- completed | |
push: | |
branches: | |
- master | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Deploy using ssh | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USERNAME }} | |
KEY: ${{ secrets.PRIVATE_KEY }} | |
PORT: 22 | |
script: | | |
cd /home/dzera-bot | |
git checkout master | |
git pull | |
git status | |
yarn install | |
yarn build | |
pm2 restart dzera |