diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..3b4f08c --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,49 @@ +name: dms-webview-CI + +on: + push: + branches: + - 'feature/**' # git-flow에서 push할 branch 명시 + - 'hotfixes' + - 'release/**' + - 'main' + - 'develop' + pull_request: + branches: + - 'main' # git-flow에서 pr을 날릴 branch 명시 + - 'develop' + - 'release/**' + +# 반복 삭제 +concurrency: + # 그룹을 pr의 head_ref로 정의 + group: ${{ github.workflow }}-${{ github.ref }} + # 해당 pr에서 새로운 워크플로우가 실행될 경우, 이전에 워크플로우가 있다면 이전 워크플로우를 취소하도록 한다. + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: github action checkout + uses: actions/checkout@v3 + + - name: use Node 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + + # Github Repository Secrets를 통해 환경 변수 파일을 생성합니다. + - name: Generate Environment Variables File for Production + env: + REACT_APP_DOMAIN: ${{ secrets.DMS_WEBVIEW_DOMAIN }} + run: | + echo "DMS_WEBVIEW_DOMAIN=$DMS_WEBVIEW_DOMAIN" >> .env + - name: Install packages + run: yarn install + + - name: Build + run: DISABLE_ESLINT_PLUGIN=true yarn build + + - name: Build packages + run: yarn build \ No newline at end of file