fix: [FN-350] sync 수신 전 update emit 및 기본 카드 추가 방지 #81
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: develop-cd | |
| on: | |
| push: | |
| branches: [dev] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: FlipNote-FE | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "23" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Create .env file | |
| run: echo "${{secrets.FE_ENV}}" > .env.production | |
| - name: Build React app | |
| run: npm run build | |
| env: | |
| NODE_ENV: production | |
| # AWS Credentials 설정 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.S3_ACCESS_KEY }} | |
| aws-secret-access-key: ${{ secrets.S3_SECRET_KEY }} | |
| aws-region: ${{ secrets.S3_BUCKET_REGION }} | |
| # S3 Sync | |
| - name: Upload to S3 | |
| run: | | |
| aws s3 sync ./dist s3://${{ secrets.S3_BUCKET_NAME }} --delete | |
| # CloudFront Cache Invalidation | |
| - name: Invalidate CloudFront Cache | |
| run: | | |
| aws cloudfront create-invalidation \ | |
| --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} \ | |
| --paths "/*" |