Skip to content

Commit

Permalink
feat: write oracle.yml test depoloy to ocl
Browse files Browse the repository at this point in the history
  • Loading branch information
jimin52 committed Nov 25, 2023
1 parent d72f526 commit 8010f4d
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/oracle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy to OCI

on:
workflow_dispatch:
push:
branches:
- deploy-test

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: setup pnpm
run: |
corepck enable
corepack prepare pnpm@latest-8 --activate
pnpm config set store-dir .pnpm-store
- name: Install dependencies
working-directory: backend
run: pnpm install

- name: Build
working-directory: backend
run: pnpm run build

- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.OCL_IP }}
username: ${{ secrets.OCL_USER }}
key: ${{ secrets.OCL_KEY }}
port: ${{ secrets.OCL_PORT }}
script: |
cd /home/opc/backend
git pull
cd backend
sudo docker compose down
sudo docker compose up -d --build

0 comments on commit 8010f4d

Please sign in to comment.