[FE] FIX: 공유사물함 단독 사용 시 나타나는 hover box 위치가 고정적으로 연장권 사용하기 버튼 위에 나오도록 … #519
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: Make ssh file | |
run: | | |
mkdir -p ~/.ssh | |
echo '${{ secrets.SSH_CONFIG }}' | base64 -d > ~/.ssh/id_rsa | |
chmod 400 ~/.ssh/id_rsa | |
- name: 체크아웃 | |
uses: actions/checkout@v3 | |
with: | |
submodule: true | |
- name: 서브모듈 업데이트 | |
run: | | |
git submodule update --init config | |
- 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: cat ./config/frontend/dev.env > ./frontend/.env | |
- name: Main env 파일 생성 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: cat ./config/frontend/main.env > ./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 '/*' |