[FE] FEAT: 연장권 사용 시 띄울 모달 추가 #1317 #281
Workflow file for this run
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: CI/CD | |
on: | |
push: | |
paths: | |
- "frontend/**" | |
workflow_dispatch: | |
jobs: | |
frontend-CI: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 체크아웃 | |
uses: actions/checkout@v2 | |
- name: Node.js 16.x Version | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- name: 종속 모듈들 캐싱 | |
uses: actions/cache@v2 | |
with: | |
path: ${{ github.workspace }}/frontend/node_modules | |
key: npm-packages-${{ hashFiles('**/frontend/package-lock.json') }} | |
id: cache | |
- name: 종속 모듈들 설치 | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm install --prefix frontend | |
# - name: lint 체크 | |
# run: npm run lint --prefix frontend | |
- name: Dev env 파일 생성 | |
if: ${{ github.ref == 'refs/heads/dev' }} | |
run: echo "${{ secrets.FRONTEND_DEV_ENV }}" | base64 --decode > frontend/.env | |
- name: Main env 파일 생성 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: echo "${{ secrets.FRONTEND_MAIN_ENV }}" | base64 --decode > frontend/.env | |
- name: 빌드 체크 | |
run: npm run build --prefix frontend | |
# - name: 단위 테스트 체크 | |
# run: npm run test --prefix frontend | |
# - name: 통합 테스트 체크 | |
# run: npm run test:e2e --prefix frontend | |
- name: Configure AWS credentials | |
if: ${{ github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' }} | |
uses: aws-actions/configure-aws-credentials@v1 | |
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: Dev S3에 배포 및 CloudFront 캐시 무효화 | |
if: ${{ github.ref == 'refs/heads/dev' }} | |
run: | | |
cd frontend | |
mkdir -p dist/src/assets | |
cp -r src/assets/images dist/src/assets | |
aws s3 sync ./dist s3://dev.cabi | |
aws cloudfront create-invalidation --distribution-id EWPTW52IH5L5C --paths '/*' | |
- name: Main S3에 배포 및 CloudFront 캐시 무효화 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: | | |
cd frontend | |
mkdir -p dist/src/assets | |
cp -r src/assets/images dist/src/assets | |
aws s3 sync ./dist s3://42cabi | |
aws cloudfront create-invalidation --distribution-id E12WMB9HCNB1DT --paths '/*' |