Skip to content

Version 0.3.0: Story 4 및 Story 5 일부 작업물 배포 #31

Version 0.3.0: Story 4 및 Story 5 일부 작업물 배포

Version 0.3.0: Story 4 및 Story 5 일부 작업물 배포 #31

Workflow file for this run

name: Deploy
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2 # workflow에서 액세스할 수 있도록 저장소를 체크아웃
- name: Create .env file
run: |
echo "VITE_BASE_URL=${{ secrets.VITE_BASE_URL }}" >> .env
echo "VITE_TOUCHEESE_API=${{ secrets.VITE_TOUCHEESE_API }}" >> .env
echo "VITE_TOUCHEESE_STUDIO_LIMIT=${{ secrets.VITE_TOUCHEESE_STUDIO_LIMIT }}" >> .env
echo "VITE_KAKAO_API_KEY=${{ secrets.VITE_KAKAO_API_KEY }}" >> .env
echo "VITE_PORTONE_CODE=${{ secrets.VITE_PORTONE_CODE }}" >> .env
echo "VITE_AUTH_IMP_CODE=${{ secrets.VITE_AUTH_IMP_CODE }}" >> .env
echo "VITE_AUTH_CHANNEL_KEY=${{ secrets.VITE_AUTH_CHANNEL_KEY }}" >> .env
echo "VITE_AUTH_REDIRECT_URI=${{ secrets.VITE_AUTH_REDIRECT_URI }}" >> .env
echo "VITE_KAKAO_CLIENT_ID=${{ secrets.VITE_KAKAO_CLIENT_ID }}" >> .env
echo "VITE_KAKAO_REDIRECT_URI=${{ secrets.VITE_KAKAO_REDIRECT_URI }}" >> .env
echo "VITE_GOOGLE_CLIENT_ID=${{ secrets.VITE_GOOGLE_CLIENT_ID }}" >> .env
echo "VITE_GOOGLE_REDIRECT_URI=${{ secrets.VITE_GOOGLE_REDIRECT_URI }}" >> .env
echo "VITE_NAVERPAY_CLIENT_ID=${{ secrets.VITE_NAVERPAY_CLIENT_ID }}" >> .env
echo "VITE_NAVERPAY_CHAIN_ID=${{ secrets.VITE_NAVERPAY_CHAIN_ID }}" >> .env
- name: Install pnpm
run: npm install -g [email protected]
- name: Check pnpm version
run: pnpm -v
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: S3 Deploy
run: aws s3 sync ./dist s3://toucheese-team4-s3/ --acl bucket-owner-full-control
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
- name: Invalidate CloudFront Cache
uses: chetan/invalidate-cloudfront-action@master
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION_ID }}
PATHS: '/*'
continue-on-error: true