Skip to content

πŸš€ [Deploy] - Response DTO μˆ˜μ •μ‚¬ν•­ 반영 (#36) #11

πŸš€ [Deploy] - Response DTO μˆ˜μ •μ‚¬ν•­ 반영 (#36)

πŸš€ [Deploy] - Response DTO μˆ˜μ •μ‚¬ν•­ 반영 (#36) #11

Workflow file for this run

name: deploy-actions
on:
push:
branches: [ "main" ]
jobs:
ci:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_TOKEN }}
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build -x test
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_PROD_REPONAME }}:0.0.1
cd:
needs: [ci]
runs-on: ubuntu-20.04
steps:
- name: Docker Image Pull And Container Run
uses: appleboy/[email protected]
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
port: ${{ 22 }}
script: |
sh /home/ubuntu/deploy.sh