fix: script 수정 #20
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: Deploy to OCI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- deploy-test | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
environment: oracle deployment | |
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: | | |
corepack enable | |
corepack prepare pnpm@latest-8 --activate | |
pnpm config set store-dir .pnpm-store | |
- name: install dependencies | |
working-directory: backend | |
run: pnpm install | |
- name: Deploy | |
uses: appleboy/ssh-action@master | |
with: | |
port: ${{ secrets.OCL_PORT }} | |
username: ${{ secrets.OCL_USER }} | |
key: ${{ secrets.OCL_KEY }} | |
host: ${{ secrets.OCL_IP }} | |
script: | | |
cd /home/opc | |
git pull | |
cd backend | |
sudo docker compose down | |
sudo docker compose up -d --build |