fix: .env 파일추가, arm64 버전 명시 #29
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/backend | |
git pull | |
echo "MYSQL_ROOT_PASSWORD=${{ secrets.MYSQL_ROOT_PASSWORD }} | |
MYSQL_DATABASE=${{ secrets.MYSQL_DATABASE }} | |
MYSQL_USER=${{ secrets.MYSQL_USER }} | |
MYSQL_PASSWORD=${{ secrets.MYSQL_PASSWORD }} | |
BACKUP_USER=${{ secrets.BACKUP_USER}} | |
BACKUP_PASSWORD=${{ secrets.BACKUP_PASSWORD }} | |
ADMIN_SLACK_ID=${{ secrets.ADMIN_SLACK_ID }} | |
DB_SCHEMA=${{ secrets.DB_SCHEMA }} | |
MODE=${{ secrets.MODE }} | |
NODE_ENV=${{ secrets.NODE_ENV }} | |
CLIENT_ID=${{ secrets.CLIENT_ID }} | |
CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} | |
REDIRECT_URL=${{ secrets.REDIRECT_URL }} | |
CLIENT_URL=${{ secrets.CLIENT_URL }} | |
BOT_USER_OAUTH_ACCESS_TOKEN=${{ secrets.BOT_USER_OAUTH_ACCESS_TOKEN }} | |
JWT_SECRET=${{ secrets.JWT_SECRET }} | |
NAVER_BOOK_SEARCH_CLIENT_ID=${{ secrets.NAVER_BOOK_SEARCH_CLIENT_ID }} | |
NATION_LIBRARY_KEY=${{ secrets.NATION_LIBRARY_KEY }} | |
NAVER_BOOK_SEARCH_SECRET=${{ secrets.NAVER_BOOK_SEARCH_SECRET }} | |
" > .env | |
sudo docker compose down | |
sudo docker compose up -d --build |