Skip to content

Commit

Permalink
fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
idoyo7 committed Dec 16, 2024
1 parent 839d179 commit b3523c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/dokcer-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,27 @@ jobs:
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV

- name: Build and push Docker image
id: build-push
run: |
docker build -t "art.montkim.com/study/my-gitbook:${{ env.SHORT_SHA }}" .
docker push "art.montkim.com/study/my-gitbook:${{ env.SHORT_SHA }}"
- name: Checkout 'study-manifests' repository
if: success() # 이전 단계가 성공한 경우에만 실행
uses: actions/checkout@v3
with:
repository: idoyo7/study-manifests
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
path: study-manifests

- name: Update manifest files
if: success() # 이전 단계가 성공한 경우에만 실행
run: |
cd study-manifests
sed -i 's|image:.*|image: art.montkim.com/study/my-gitbook:${{ env.SHORT_SHA }}|' deployment.yaml
- name: Commit and push changes to 'study-manifests'
if: success() # 이전 단계가 성공한 경우에만 실행
run: |
cd study-manifests
git config user.name "${{ github.actor }}"
Expand Down
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ WORKDIR /app
# 필요한 의존성 설치
RUN apk add --no-cache python3 make g++

# 의존성 설치 및 빌드
COPY package*.json ./
RUN npm install

# HonKit 설치 및 빌드
# HonKit 설치
RUN npm install -g honkit

# 프로젝트 소스 복사
COPY . .

# HonKit 빌드
RUN honkit build

# 2단계: 최종 실행 스테이지
Expand All @@ -23,6 +23,9 @@ WORKDIR /app
# 빌드 결과물만 복사
COPY --from=builder /app/_book /app/_book

# 정적 파일 제공에 필요한 serve 설치
RUN npm install -g serve

# 포트 설정
EXPOSE 4000

Expand Down

0 comments on commit b3523c4

Please sign in to comment.