Merge pull request #16 from DMU-DebugVisual/inseong #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: GitHub Pages Deployment | |
| on: | |
| push: | |
| branches: | |
| - main # main 브랜치에 push할 때 자동 배포 | |
| jobs: | |
| build: | |
| name: Build and Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 # 프로젝트에 맞는 Node.js 버전 | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Build Project | |
| run: npm run build # 프로젝트에 맞는 빌드 명령어로 수정 | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build # 빌드 결과물이 저장되는 디렉토리 (React는 보통 build) |