Skip to content

ci/cd secrets bug fix #12

ci/cd secrets bug fix

ci/cd secrets bug fix #12

Workflow file for this run

name: Deploy to VPS
on:
push:
branches:
- main
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 }}
password: ${{ secrets.PASSWORD }}
source: "."
target: "~/core"
- name: Executing remote commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd ~/core
touch .env
echo "${{secrets.MONGO_URI}}" >> .env
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
yarn && yarn build
pm2 restart api