Skip to content

Merge branch 'development' #34

Merge branch 'development'

Merge branch 'development' #34

Workflow file for this run

name: Deploy to GitHub Pages and Oracle Compute Instance
on:
push:
branches:
- main # Trigger deployment on pushes to the main branch
jobs:
deploy-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: SSH to Oracle Instance and Deploy Backend
uses: appleboy/[email protected]
with:
host: ${{ secrets.ORACLE_HOST }} # Your Oracle Instance IP
username: ${{ secrets.Oracle_USER }} # Your Oracle username
key: ${{ secrets.Oracle_SSH_KEY }} # Your SSH private key
script: |
export NODE_ENV=production
cd /home/opc/InstagramTool # Adjust the path to your backend
git pull origin main # Pull the latest changes
cd Backend
npm install # Install only production dependencies
pm2 restart nodejs-server # Restart your Node.js app with PM2