Removed unnecessary path to run the action properly now #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Oracle-Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Deploy Algo to Oracle on main branch push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo to oracle | |
uses: actions/checkout@v4 | |
- name: Remove existing repo from Oracle VM | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.ORACLE_DNS }} | |
username: ${{ secrets.ORACLE_USERNAME }} | |
key: ${{ secrets.ORACLE_KEY }} | |
script: | | |
sudo rm -rf Algo-Game | |
# - name: Deploy to Oracle | |
# uses: easingthemes/ssh-deploy@main | |
# env: | |
# SSH_PRIVATE_KEY: ${{ secrets.ORACLE_KEY }} | |
# REMOTE_HOST: ${{ secrets.ORACLE_DNS }} | |
# REMOTE_USER: ${{ secrets.ORACLE_USERNAME }} | |
# - name: Executing remote ssh commands using ssh key | |
# uses: appleboy/ssh-action@master | |
# with: | |
# host: ${{ secrets.ORACLE_DNS }} | |
# username: ${{ secrets.ORACLE_USERNAME }} | |
# key: ${{ secrets.ORACLE_KEY }} | |
# script: | | |
# sudo apt -y update | |
# sudo npm install -g pm2 | |
# cd Algo-Game | |
# touch .env | |
# echo "${{ secrets.API_ENV }}" > .env | |
# sudo npm install | |
# sudo pm2 stop server | |
# sudo pm2 delete server | |
# sudo pm2 start --name="server" sudo -- node server.js |