Skip to content

Merge branch 'dev' of https://github.com/BookwooriAlpineClub/Bookwoor… #17

Merge branch 'dev' of https://github.com/BookwooriAlpineClub/Bookwoor…

Merge branch 'dev' of https://github.com/BookwooriAlpineClub/Bookwoor… #17

Workflow file for this run

name: Deploy
on:
push:
branches:
- deploy-1.1
jobs:
build:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
steps:
- name: Checkout source code.
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set environment variables
run: |
echo "REACT_APP_API_URL=${{ secrets.REACT_APP_API_URL }}" >> .env
echo "REACT_APP_KAKAO_URL=${{ secrets.REACT_APP_KAKAO_URL }}" >> .env
echo "REACT_APP_WEBSOCKET_URL=${{ secrets.REACT_APP_WEBSOCKET_URL }}" >> .env
echo "REACT_APP_WEBSOCKET_URL_SECURE=${{ secrets.REACT_APP_WEBSOCKET_URL_SECURE }}" >> .env
- name: Install dependencies
run: |
npm install
- name: Build project
run: |
npm run build
env:
CI: false
- name: Show AWS CLI Version
run: aws --version
- name: Sync S3 Bucket
run: |
aws s3 sync \
build s3://${{secrets.S3_BUCKETS}} \
--delete \
--cache-control "no-cache, no-store, must-revalidate" \
- name: Invalidate CloudFront Cache
run: |
aws cloudfront create-invalidation \
--distribution-id ${{secrets.CLOUDFRONT_DISTRIBUTION_ID}} \
--paths "/*"