testing #171
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 apitest.elma.online | |
on: | |
push: | |
branches: | |
- dev | |
- lev-as-image-dev | |
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 }} | |
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 }} | |
git pull | |
git checkout lev-as-image-dev | |
yarn | |
pm2 restart api |