Skip to content

fix: export

fix: export #24

Workflow file for this run

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/backend
git pull
export MYSQL_DATABASE=${{ secrets.MYSQL_DATABASE }}
export MYSQL_USER=${{ secrets.MYSQL_USER }}
export MYSQL_PASSWORD=${{ secrets.MYSQL_PASSWORD }}
export BACKUP_USER=${{ secrets.BACKUP_USER}}
export BACKUP_PASSWORD=${{ secrets.BACKUP_PASSWORD }}
export ADMIN_SLACK_ID=${{ secrets.ADMIN_SLACK_ID }}
export DB_SCHEMA=${{ secrets.DB_SCHEMA }}
export MODE=${{ secrets.MODE }}
export NODE_ENV=${{ secrets.NODE_ENV }}
export CLIENT_ID=${{ secrets.CLIENT_ID }}
export CLIENT_SECRET=${{ secrets.CLIENT_SECRET }}
export REDIRECT_URL=${{ secrets.REDIRECT_URL }}
export CLIENT_URL=${{ secrets.CLIENT_URL }}
export BOT_USER_OAUTH_ACCESS_TOKEN=${{ secrets.BOT_USER_OAUTH_ACCESS_TOKEN }}
export JWT_SECRET=${{ secrets.JWT_SECRET }}
export NAVER_BOOK_SEARCH_CLIENT_ID=${{ secrets.NAVER_BOOK_SEARCH_CLIENT_ID }}
export NATION_LIBRARY_KEY=${{ secrets.NATION_LIBRARY_KEY }}
export NAVER_BOOK_SEARCH_SECRET=${{ secrets.NAVER_BOOK_SEARCH_SECRET }}
sudo docker compose up -d --build
sudo docker compose down