Skip to content

Update deploy.yml

Update deploy.yml #126

Workflow file for this run

name: Deploy to VPS
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy repository contents via scp
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSHKEY }}
source: "."
target: "/osai-website/website-reboot"
- name: Executing remote commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSHKEY }}
script: |
cd /osai-website/website-reboot/frontend
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
yarn && yarn build
pm2 restart nextjs