Skip to content

feat: 룩 상세 페이지 추가 #78

feat: 룩 상세 페이지 추가

feat: 룩 상세 페이지 추가 #78

Workflow file for this run

name: Deploy to S3 and CloudFront
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: deploy-production
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
env:
VITE_KAKAO_APP_KEY: ${{ secrets.VITE_KAKAO_APP_KEY }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Sync to S3 (assets)
run: |
aws s3 sync dist s3://${{ secrets.AWS_S3_BUCKET }} \
--delete \
--exclude "index.html" \
--cache-control "max-age=31536000,public"
- name: Upload index.html (no-cache)
run: |
aws s3 cp dist/index.html s3://${{ secrets.AWS_S3_BUCKET }}/index.html \
--cache-control "no-cache, no-store, must-revalidate"
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} \
--paths "/*"