Skip to content

Setting up Env Variables #10

Setting up Env Variables

Setting up Env Variables #10

Workflow file for this run

name: Deploy Application
on:
push:
branches:
- main # or any branch you want to deploy from
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to remove server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd workplace/Questionnaire
git pull origin main
npm install
cd ws-events
npm install
npm run build
npm link
cd ..
cd frontend
npm link @ruchir28/ws-events
cd ../backend
npm link @ruchir28/ws-events
cd ..
export REACT_APP_BACKEND_URL=${{ secrets.REACT_APP_BACKEND_URL }}
export REACT_APP_WS_URL=${{ secrets.REACT_APP_WS_URL }}
npm run build:frontend
npm run build:backend
sudo mv frontend/build /var/www/Questionnaire
cd backend
pm2 reload dist/index.js