Skip to content

changed the vps hosting ci/cd #124

changed the vps hosting ci/cd

changed the vps hosting ci/cd #124

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
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
KEY: ${{ secrets.SSHKEY }}
with:
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