Skip to content

v0.1.13

v0.1.13 #50

Workflow file for this run

name: CI/CD
on:
release:
types:
- published
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Repository 접근
uses: actions/checkout@v4
- name: JDK 21 셋팅
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Gradle 의존성 캐싱
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: 이미지 빌드 및 푸쉬
env:
SECRET_MANAGER_TOKEN: ${{ secrets.SECRET_MANAGER_TOKEN }}
SECRET_MANAGER_WORKSPACE: ${{ secrets.SECRET_MANAGER_WORKSPACE }}
NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }}
NCP_API_ACCESS_KEY: ${{ secrets.NCP_API_ACCESS_KEY }}
NCP_API_SECRET_KEY: ${{ secrets.NCP_API_SECRET_KEY }}
run: |
./gradlew :piikii-bootstrap:bootBuildImage
- name: 서버 재시작 스크립트 실행
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
key: ${{ secrets.SERVER_KEY }}
script: |
./deploy.sh