Skip to content

Delete Backend/.env.production #14

Delete Backend/.env.production

Delete Backend/.env.production #14

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-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./Frontend # Directory of your static files
publish_branch: gh-pages # Use main branch for GitHub Pages
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/Backend # Adjust the path to your backend
git pull origin main # Pull the latest changes
npm install # Install only production dependencies
pm2 restart nodejs-server # Restart your Node.js app with PM2