Skip to content

chore: 백엔드 배포 자동화 (#134) #1

chore: 백엔드 배포 자동화 (#134)

chore: 백엔드 배포 자동화 (#134) #1

Workflow file for this run

name: 🌻 Sunny Braille server DEV CD
on:
workflow_dispatch:
push:
branches:
- main
jobs:
backend-docker-build-and-push:
runs-on: ubuntu-latest
steps:
- name: ✨ Checkout repository
uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.ACTION_TOKEN }}
- name: ✨ JDK 17 설정
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: ✨ Gradle Caching
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: ✨ Gradlew 권한 설정
run: chmod +x ./gradlew
- name: ✨ Jar 파일 빌드
run: ./gradlew bootJar
backend-docker-pull-and-run:
runs-on: [self-hosted, dev]
steps:
- name: ✨ 배포 스크립트 실행
run: |
sh /home/ubuntu/deploy.sh