Chore: 배포환경 테스트 #1
Workflow file for this run
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: Deploy Preview for PRs | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| deploy-preview: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1. 코드 체크아웃 | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| # 2. 의존성 설치 | |
| - name: Install dependencies | |
| run: npm install | |
| # 3. 빌드 실행 | |
| - name: Build application | |
| run: npm run build | |
| # 4. S3에 미리보기 배포 | |
| - name: Deploy to S3 | |
| run: | | |
| aws s3 sync ./build s3://your-preview-bucket/pr-${{ github.event.number }} --delete | |
| # 5. PR에 미리보기 URL 등록 | |
| - name: Add Preview URL to PR | |
| uses: thollander/actions-comment-pull-request@v1 | |
| with: | |
| message: "Preview available at: https://your-preview-bucket.s3.amazonaws.com/pr-${{ github.event.number }}/" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |