map, mapClusterer에 useContext 적용 및 hook cycle 로 리팩토링 (#135) #21
This file contains 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 To Production | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
env: | |
VITE_KAKAO_MAP_API_KEY: ${{ secrets.REACT_APP_KAKAO_MAP_API_KEY }} | |
VITE_SUPABASE_URL: https://izhutepzzveasglrlbcx.supabase.co | |
VITE_SUPABASE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Iml6aHV0ZXB6enZlYXNnbHJsYmN4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mjc5NTkyMzgsImV4cCI6MjA0MzUzNTIzOH0.kxdrs6OI-fD2QXsdmqZJx_Knm_gwDEXFYqgte46akEw | |
VITE_API_ERROR_HELPER_HOST: ${{ secrets.REACT_APP_API_ERROR_HELPER_HOST }} | |
VITE_GOOGLE_CLIENT_ID: ${{ secrets.VITE_GOOGLE_CLIENT_ID }} | |
run: pnpm run build | |
- name: Reinstall without Dev Dependencies | |
run: rm -rf node_modules && pnpm install --prod --ignore-scripts | |
- name: Deploy | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | |
run: | | |
aws s3 cp \ | |
--recursive \ | |
--region ap-northeast-2 \ | |
dist s3://$AWS_BUCKET | |
- name: Cloudfront Invalidation | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ap-northeast-2 | |
DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} | |
run: | | |
aws cloudfront create-invalidation \ | |
--distribution-id $DISTRIBUTION_ID \ | |
--paths "/*" |