Merge pull request #734 from elmadev/dev #67
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: Deployment to api.elma.online | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
if: contains(github.event.head_commit.message, 'skip ci') == false | |
name: ssh into server, pull from repo, install deps, restart in pm2 | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using password | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST_LIVE }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
export NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
cd ${{ secrets.SSH_PATH_LIVE }} | |
git pull | |
yarn | |
pm2 restart api |