Skip to content

Commit

Permalink
docs : git tmp 파일 제거 후 build 변경
Browse files Browse the repository at this point in the history
git tmp 파일 제거 후 build 변경
  • Loading branch information
InJun2 authored Oct 30, 2024
1 parent 019ac51 commit e1f0901
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,21 @@ on:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v3 # 최신 버전으로 업데이트
with:
submodules: recursive
fetch-depth: 0
token: ${{ secrets.GIT_TOKEN }}
uses: actions/checkout@v3

- name: Update submodules to latest commit on main branch
run: git submodule update --remote
- name: Clean up temporary files to free space
run: rm -rf /tmp/*

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# gradle caching - 빌드 시간 향상
- name: Cache Gradle packages
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -66,6 +58,6 @@ jobs:
sudo docker ps
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/url-shortener
sudo docker stop server || true
sudo docker rm server || true # 중복된 이름 문제 해결
sudo docker rm server || true
sudo docker run -d -p 8080:8080 --name server ${{ secrets.DOCKER_USERNAME }}/url-shortener
sudo docker image prune -f

0 comments on commit e1f0901

Please sign in to comment.