Skip to content

Commit

Permalink
✨feature : Docker 배포기능 작업
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkYunHo committed Jun 28, 2023
1 parent d9d7808 commit 67b359b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 101 deletions.
62 changes: 1 addition & 61 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: ci

on:
push:
# paths:
# - 'api/**'
# - 'batch/**'
tags:
- 'v**'

Expand Down Expand Up @@ -32,73 +29,16 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Set Path Filter (api, batch)
# uses: dorny/[email protected]
# id: changes
# with:
# filters: |
# api:
# - 'api/**'
# batch:
# - 'batch/**'

# API build&deploy
- name: Build Gradle with JIB (API)
# if: steps.changes.outputs.api == 'true'
run: ./gradlew clean --stacktrace -PtagName=$GITHUB_REF_NAME --build-file=./api/build.gradle.kts -Djib.console=plain -Djib.useOnlyProjectCache=true jib

- name: Execute Remote SSH & Deploy 'API' module
# if: steps.changes.outputs.api == 'true'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_SSH_HOST }}
username: ${{ secrets.REMOTE_SSH_USERNAME }}
key: ${{ secrets.REMOTE_SSH_KEY }}
# passphrase: ${{ secrets.REMOTE_SSH_PASSPHRASE }}
# port: ${{ secrets.REMOTE_SSH_PORT }}
script: |
whoami
docker pull johnpark0921/lotto-portfolio:$GITHUB_REF_NAME
docker container run --name lotto-portfolio -p 8080:8080 johnpark0921/lotto-portfolio:$GITHUB_REF_NAME









# runs-on: ubuntu-latest
# steps:
# - name: Git Checkout
# uses: actions/checkout@v2
#
# - name: Setup JDK
# uses: actions/setup-java@v1
# with:
# java-version: 17
#
# - name: Grant execute permission for gradlew
# run: chmod +x gradlew
#
# - name: Dockerhub Login
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# - name: Build Gradle with JIB
# run: ./gradlew clean --stacktrace -PtagName=$GITHUB_REF_NAME --build-file=./api/build.gradle.kts -Djib.console=plain -Djib.useOnlyProjectCache=true jib
#
# - name: execute remote ssh
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.REMOTE_SSH_HOST }}
# username: ${{ secrets.REMOTE_SSH_USERNAME }}
# key: ${{ secrets.REMOTE_SSH_KEY }}
## passphrase: ${{ secrets.REMOTE_SSH_PASSPHRASE }}
## port: ${{ secrets.REMOTE_SSH_PORT }}
# script: |
# whoami
docker container run --name lotto-portfolio -p 8080:8080 johnpark0921/lotto-portfolio:$GITHUB_REF_NAME
40 changes: 0 additions & 40 deletions .github/workflows/deploy.yaml

This file was deleted.

0 comments on commit 67b359b

Please sign in to comment.