Skip to content

[feature/#313] docker network 사용 #56

[feature/#313] docker network 사용

[feature/#313] docker network 사용 #56

Workflow file for this run

name: deploy-dev
on:
push:
branches: [ master ]
workflow_dispatch:
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 -x test
- name: copy file via ssh
uses: appleboy/scp-action@master
with:
host: ${{ secrets.IBAS_DEV_HOST }}
username: ${{ secrets.IBAS_DEV_USERNAME }}
key: ${{ secrets.IBAS_DEV_SSH_KEY }}
passphrase: ${{ secrets.IBAS_DEV_PASSWORD }}
# port: ${{ secrets.PORT }} # default : 22
source: "docker-compose.yml"
target: ${{ secrets.IBAS_DEV_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 }}:dev
- name: execute deploy shell script via ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.IBAS_DEV_HOST }}
username: ${{ secrets.IBAS_DEV_USERNAME }}
key: ${{ secrets.IBAS_DEV_SSH_KEY }}
passphrase: ${{ secrets.IBAS_DEV_PASSWORD }}
# port: ${{ secrets.PORT }} # default : 22
script: |
bash ${{ secrets.IBAS_DEV_DEPLOY_PATH }}/deploy.sh