Skip to content

Core Rewrite (#125) #333

Core Rewrite (#125)

Core Rewrite (#125) #333

Workflow file for this run

name: Deploy to dev on push
on:
workflow_run:
workflows: ['Lint']
types:
- completed
push:
paths:
- src/**
- .github/workflows/lint.yml
- .github/workflows/main.yml
branches: [main]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Pull and install
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST_DEV }}
username: ${{ secrets.SSH_USERNAME_DEV }}
port: ${{ secrets.SSH_PORT_DEV }}
password: ${{ secrets.SSH_PASSWORD_DEV }}
script: |
source ~/.bashrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
cd crm-bot && git fetch --all && git reset --hard origin/prod && yarn install && pm2 delete crm-bot && yarn pm2