Skip to content

feat : HEEXE 상품 추천 전략 작성 #138 (#139) #132

feat : HEEXE 상품 추천 전략 작성 #138 (#139)

feat : HEEXE 상품 추천 전략 작성 #138 (#139) #132

Workflow file for this run

name: TIFY CI/CD
on:
push:
branches: [ "dev", "main" ]
permissions:
contents: read
jobs:
build:
name: TIFY CI/CD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup jdk-17
uses: actions/setup-java@main
with:
java-version: 17
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Docker build
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }} .
docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }}:latest
# AWS EC2 Server Connect & Docker 명령어 실행
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_HOST }}
username: ubuntu
key: ${{ secrets.AWS_KEY }}
timeout: 60s
# 도커 작업
script: |
cd ~/srv
sh ~/srv/ubuntu/config/scripts/docker-init.sh
sudo rm concal.log
sudo docker rm - f $(docker ps -qa)
sudo docker-compose pull
sudo docker stop $(docker ps -a -q)
sudo docker-compose -f docker-compose.test.yml up -d
sudo docker logs -f backend &> concal.log &
sudo docker image prune -f