Skip to content

merge #133: DB 구조 변경에 따른 기존 게시글 조회/수정/삭제 및 좋아요, 신고 API 수정 #31

merge #133: DB 구조 변경에 따른 기존 게시글 조회/수정/삭제 및 좋아요, 신고 API 수정

merge #133: DB 구조 변경에 따른 기존 게시글 조회/수정/삭제 및 좋아요, 신고 API 수정 #31

Workflow file for this run

name: CI
on:
push:
branches: [be-develop, main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout...
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install package
run: |
cd BE
npm ci
- name: Docker Login
run: docker login -u ${{ secrets.DOCKER_ID }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker
run: |
cd BE
docker build -f Dockerfile -t traveline/traveline-docker .
- name: Push Docker
run: |
cd BE
docker push traveline/traveline-docker:latest
- name: SSH Login
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_PORT }}
script: |
docker login --username ${{ secrets.DOCKER_ID }} --password ${{ secrets.DOCKER_PASSWORD }}
docker pull traveline/traveline-docker
docker stop traveline-container || true
docker rm traveline-container || true
docker run -e DB_HOST=${{ secrets.DB_HOST }} -e DB_PORT=${{ secrets.DB_PORT }} -e DB_USER=${{ secrets.DB_USER }} -e DB_PASSWORD=${{ secrets.DB_PASSWORD }} -e DB_DATABASE=${{ secrets.DB_DATABASE }} -e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} -e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} -e AWS_REGION=${{ secrets.AWS_REGION }} -e JWT_SECRET=${{ secrets.JWT_SECRET }} -d -p ${{secrets.EXTERNAL_PORT}}:${{secrets.INTERNAL_PORT}} --name traveline-container traveline/traveline-docker