Skip to content

[feature/#313] docker network IP 수정 #1

[feature/#313] docker network IP 수정

[feature/#313] docker network IP 수정 #1

name: deploy-production
on:
push:
branches:
- release-*
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: copy file via ssh
uses: appleboy/scp-action@master
with:
host: ${{ secrets.IBAS_PROD_HOST }}
username: ${{ secrets.IBAS_PROD_USERNAME }}
key: ${{ secrets.IBAS_PROD_SSH_KEY }}
passphrase: ${{ secrets.IBAS_PROD_PASSWORD }}
# port: ${{ secrets.PORT }} # default : 22
source: "docker-compose.yml"
target: ${{ secrets.IBAS_PROD_DEPLOY_PATH }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_STORAGE }}:prod
- name: execute deploy shell script via ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.IBAS_PROD_HOST }}
username: ${{ secrets.IBAS_PROD_USERNAME }}
key: ${{ secrets.IBAS_PROD_SSH_KEY }}
passphrase: ${{ secrets.IBAS_PROD_PASSWORD }}
# port: ${{ secrets.PORT }} # default : 22
script: |
bash ${{ secrets.IBAS_PROD_DEPLOY_PATH }}/deploy.sh