Skip to content

Commit

Permalink
ci: GitHub Pages 배포 워크플로우 개선
Browse files Browse the repository at this point in the history
- GitHub Actions 공식 Pages 액션으로 변경
- 권한 설정 추가
- 빌드와 배포 작업 분리
- 수동 실행 트리거 추가
  • Loading branch information
serithemage committed Jan 23, 2025
1 parent 14fa001 commit 956a582
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/frontend-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ on:
branches: [ main ]
paths:
- 'frontend/**'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -31,9 +37,22 @@ jobs:
env:
VITE_API_ENDPOINT: ${{ secrets.VITE_API_ENDPOINT }}

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./frontend/dist
cname: todo.awskrug.dev # 필요한 경우 CNAME 설정
path: ./frontend/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

[![GitHub license](https://img.shields.io/github/license/awskrug/aiengineering-demo)](LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/awskrug/aiengineering-demo)](https://github.com/awskrug/aiengineering-demo/stargazers)
[![배포 상태](https://github.com/awskrug/aiengineering-demo/actions/workflows/frontend-deploy.yml/badge.svg)](https://todo.awskrug.dev)

AWS 서버리스 아키텍처를 활용한 현대적인 TODO 애플리케이션입니다. 이 프로젝트는 [2025년 1월 22일 있었던 AWS Korea User Group의 AI 엔지니어링 모임](https://www.meetup.com/awskrug/events/305372486/?slug=awskrug&eventId=305372486)에서 진행한 발표 내용의 일부로 라이브 코딩을 통해 제작되었습니다.

🔗 [데모 페이지](https://awskrug.github.io/aiengineering-demo/)
🔗 [데모 애플리케이션](https://todo.awskrug.dev)

## 📚 프로젝트 문서

Expand Down

0 comments on commit 956a582

Please sign in to comment.