Skip to content

Commit

Permalink
deploy: s3, cloudFront 관련 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobbymin committed Oct 27, 2024
1 parent 37edd26 commit bd70859
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/deploy-admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Deploy Admin Page to AWS
on:
pull_request:
branches: ["develop"]
workflow_dispatch:
env:
AWS_REGION: us-northeast-2
ADMIN_BUCKET_NAME: vision.gdsc-knu.com
permissions:
contents: read

jobs:
deploy:
Expand All @@ -24,7 +30,6 @@ jobs:
- name: Create .env file
run: |
echo "VITE_APP_BASE_URL=${{ secrets.VITE_APP_BASE_URL }}" >> .env
echo "VITE_ENV"=${{ secrets.VITE_ENV }} >> .env
- name: Install Dependencies
run: yarn admin install
Expand All @@ -37,11 +42,11 @@ jobs:
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2
aws-region: ${{ env.AWS_REGION }}

- name: Upload to AWS S3
env:
BUCKET_NAME: ${{secrets.ADMIN_BUCKET_NAME}}
BUCKET_NAME: ${{env.ADMIN_BUCKET_NAME}}
run: aws s3 sync packages/admin/dist s3://$BUCKET_NAME --delete

- name: Invalidate Cloudfront Cache
Expand Down

0 comments on commit bd70859

Please sign in to comment.